OSDN Git Service
(root)
/
uclinux-h8
/
uClibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1218c09
)
Avoid potential double free when locate_library_file() is used
author
Eric Andersen
<andersen@codepoet.org>
Fri, 13 Feb 2004 09:51:32 +0000
(09:51 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Fri, 13 Feb 2004 09:51:32 +0000
(09:51 -0000)
on fully resolved names
utils/ldd.c
patch
|
blob
|
history
diff --git
a/utils/ldd.c
b/utils/ldd.c
index
6569c20
..
9e9e08d
100644
(file)
--- a/
utils/ldd.c
+++ b/
utils/ldd.c
@@
-669,11
+669,14
@@
int main( int argc, char** argv)
printf("\tnot a dynamic executable\n");
for (cur = lib_list; cur; cur=cur->next) {
- free(cur->name);
- cur->name=NULL;
- if (cur->path && cur->path != not_found)
+ if (cur->path && cur->path != not_found) {
free(cur->path);
- cur->path=NULL;
+ cur->path=NULL;
+ }
+ if (cur->name) {
+ free(cur->name);
+ cur->name=NULL;
+ }
}
lib_list=NULL;
}