summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-11-12 08:21:58 +0000
committerEric Andersen <andersen@codepoet.org>2003-11-12 08:21:58 +0000
commited4b5a14e420475ff287cb6f6fddefd4bc1e4120 (patch)
tree00c4be15d72368a670a1ecd8c48dd194266ad7f4 /utils
parent9c7c0249ac5e1a596581597fb65a3aba4b4d9d5c (diff)
Fix a stupid potential segfault
Diffstat (limited to 'utils')
-rw-r--r--utils/ldd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/ldd.c b/utils/ldd.c
index 3ea41b424..8fdd0c10b 100644
--- a/utils/ldd.c
+++ b/utils/ldd.c
@@ -653,7 +653,8 @@ int main( int argc, char** argv)
for (cur = lib_list; cur; cur=cur->next) {
free(cur->name);
cur->name=NULL;
- free(cur->path);
+ if (cur->path && cur->path != not_found)
+ free(cur->path);
cur->path=NULL;
}
lib_list=NULL;