Memory leak in error case. CID 873.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25642 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2965,8 +2965,10 @@ devfs_publish_file_device(const char *path, const char *filePath)
|
|||||||
RecursiveLocker locker(&sDeviceFileSystem->lock);
|
RecursiveLocker locker(&sDeviceFileSystem->lock);
|
||||||
|
|
||||||
status = new_node(sDeviceFileSystem, path, &node, &dirNode);
|
status = new_node(sDeviceFileSystem, path, &node, &dirNode);
|
||||||
if (status != B_OK)
|
if (status != B_OK) {
|
||||||
|
free((char*)filePath);
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
// all went fine, let's initialize the node
|
// all went fine, let's initialize the node
|
||||||
node->stream.type = S_IFLNK | 0644;
|
node->stream.type = S_IFLNK | 0644;
|
||||||
|
|||||||
Reference in New Issue
Block a user