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:
Ingo Weinhold
2008-05-24 16:04:57 +00:00
parent 06a28b5416
commit 7ad3cf0bc3
+3 -1
View File
@@ -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;