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)()
|
---|
8 | 2638 strerror(error)));
|
---|
9 | 2639 return error;
|
---|
10 | 2640 }
|
---|
11 | 2641
|
---|
12 | 2642 // get the directory path
|
---|
13 | 2643 error = dir_vnode_to_path(dirNode, buffer, bufferSize);
|
---|
14 | >>> CID 702320: (USE_AFTER_FREE)
|
---|
15 | >>> Calling "put_vnode" dereferences freed pointer "dirNode".
|
---|
16 | 2644 put_vnode(dirNode);
|
---|
17 | 2645 if (error < FSSH_B_OK) {
|
---|
18 | 2646 TRACE(("vfs_normalize_path(): failed to get dir path: %s\n", strerror(error)));
|
---|
19 | 2647 return error;
|
---|
20 | 2648 }
|
---|
21 | 2649
|
---|
22 | /work/haiku/coverity/haiku/src/tools/fs_shell/vfs.cpp: 2644 in FSShell::vfs_normalize_path(const char *, char *, unsigned long, bool)()
|
---|
23 | 2638 strerror(error)));
|
---|
24 | 2639 return error;
|
---|
25 | 2640 }
|
---|
26 | 2641
|
---|
27 | 2642 // get the directory path
|
---|
28 | 2643 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".
|
---|
31 | 2644 put_vnode(dirNode);
|
---|
32 | 2645 if (error < FSSH_B_OK) {
|
---|
33 | 2646 TRACE(("vfs_normalize_path(): failed to get dir path: %s\n", strerror(error)));
|
---|
34 | 2647 return error;
|
---|
35 | 2648 }
|
---|
36 | 2649
|
---|
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)()
|
---|
45 | 2746 status = get_vnode(device, inode, &vnode, false);
|
---|
46 | 2747 if (status < FSSH_B_OK)
|
---|
47 | 2748 return status;
|
---|
48 | 2749
|
---|
49 | 2750 // get the directory path
|
---|
50 | 2751 status = dir_vnode_to_path(vnode, path, pathLength);
|
---|
51 | >>> CID 1397511: (USE_AFTER_FREE)
|
---|
52 | >>> Calling "put_vnode" dereferences freed pointer "vnode".
|
---|
53 | 2752 put_vnode(vnode);
|
---|
54 | 2753 // we don't need the vnode anymore
|
---|
55 | 2754 if (status < FSSH_B_OK)
|
---|
56 | 2755 return status;
|
---|
57 | 2756
|
---|
58 | 2757 // 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)()
|
---|
60 | 2746 status = get_vnode(device, inode, &vnode, false);
|
---|
61 | 2747 if (status < FSSH_B_OK)
|
---|
62 | 2748 return status;
|
---|
63 | 2749
|
---|
64 | 2750 // get the directory path
|
---|
65 | 2751 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".
|
---|
68 | 2752 put_vnode(vnode);
|
---|
69 | 2753 // we don't need the vnode anymore
|
---|
70 | 2754 if (status < FSSH_B_OK)
|
---|
71 | 2755 return status;
|
---|
72 | 2756
|
---|
73 | 2757 // append the leaf name
|
---|