Ticket #13131: CID 702320 and 1397511 USE_AFTER_FREE.txt

File CID 702320 and 1397511 USE_AFTER_FREE.txt, 3.5 KB (added by jscipione, 4 years ago)

CID 702320 and 1397511 USE_AFTER_FREE

Line 
1** CID 702320: (USE_AFTER_FREE)
2/work/haiku/coverity/haiku/src/tools/fs_shell/vfs.cpp: 2644 in FSShell::vfs_normalize_path(const char *, char *, unsigned long, bool)()
3
4
5________________________________________________________________________________________________________
6*** CID 702320: (USE_AFTER_FREE)
7/work/haiku/coverity/haiku/src/tools/fs_shell/vfs.cpp: 2644 in FSShell::vfs_normalize_path(const char *, char *, unsigned long, bool)()
82638 strerror(error)));
92639 return error;
102640 }
112641
122642 // get the directory path
132643 error = dir_vnode_to_path(dirNode, buffer, bufferSize);
14>>> CID 702320: (USE_AFTER_FREE)
15>>> Calling "put_vnode" dereferences freed pointer "dirNode".
162644 put_vnode(dirNode);
172645 if (error < FSSH_B_OK) {
182646 TRACE(("vfs_normalize_path(): failed to get dir path: %s\n", strerror(error)));
192647 return error;
202648 }
212649
22/work/haiku/coverity/haiku/src/tools/fs_shell/vfs.cpp: 2644 in FSShell::vfs_normalize_path(const char *, char *, unsigned long, bool)()
232638 strerror(error)));
242639 return error;
252640 }
262641
272642 // get the directory path
282643 error = dir_vnode_to_path(dirNode, buffer, bufferSize);
29>>> CID 702320: (USE_AFTER_FREE)
30>>> Passing freed pointer "dirNode" as an argument to "put_vnode".
312644 put_vnode(dirNode);
322645 if (error < FSSH_B_OK) {
332646 TRACE(("vfs_normalize_path(): failed to get dir path: %s\n", strerror(error)));
342647 return error;
352648 }
362649
37
38** CID 1397511: (USE_AFTER_FREE)
39/work/haiku/coverity/haiku/src/tools/fs_shell/vfs.cpp: 2752 in FSShell::vfs_entry_ref_to_path(int, long, const char *, bool, char *, unsigned long)()
40
41
42________________________________________________________________________________________________________
43*** CID 1397511: (USE_AFTER_FREE)
44/work/haiku/coverity/haiku/src/tools/fs_shell/vfs.cpp: 2752 in FSShell::vfs_entry_ref_to_path(int, long, const char *, bool, char *, unsigned long)()
452746 status = get_vnode(device, inode, &vnode, false);
462747 if (status < FSSH_B_OK)
472748 return status;
482749
492750 // get the directory path
502751 status = dir_vnode_to_path(vnode, path, pathLength);
51>>> CID 1397511: (USE_AFTER_FREE)
52>>> Calling "put_vnode" dereferences freed pointer "vnode".
532752 put_vnode(vnode);
542753 // we don't need the vnode anymore
552754 if (status < FSSH_B_OK)
562755 return status;
572756
582757 // append the leaf name
59/work/haiku/coverity/haiku/src/tools/fs_shell/vfs.cpp: 2752 in FSShell::vfs_entry_ref_to_path(int, long, const char *, bool, char *, unsigned long)()
602746 status = get_vnode(device, inode, &vnode, false);
612747 if (status < FSSH_B_OK)
622748 return status;
632749
642750 // get the directory path
652751 status = dir_vnode_to_path(vnode, path, pathLength);
66>>> CID 1397511: (USE_AFTER_FREE)
67>>> Passing freed pointer "vnode" as an argument to "put_vnode".
682752 put_vnode(vnode);
692753 // we don't need the vnode anymore
702754 if (status < FSSH_B_OK)
712755 return status;
722756
732757 // append the leaf name