summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-19 20:24:42 -0400
committermidipix <writeonce@midipix.org>2016-04-19 20:24:42 -0400
commit085f3a854b316e33747812e93d18a98238828ea8 (patch)
tree1fefe7d9134e615455c6f74f42d283ec8332961c
parent51b7dfc891504bbec7d7682fa15858ef0c5b4f4e (diff)
downloadslibtool-085f3a854b316e33747812e93d18a98238828ea8.tar.bz2
slibtool-085f3a854b316e33747812e93d18a98238828ea8.tar.xz
slbt_get_deps_meta(): free the dependency list buffer as needed.
-rw-r--r--src/logic/slbt_exec_link.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 6f1e4a1..32731b3 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -110,6 +110,9 @@ static int slbt_get_deps_meta(
while (fscanf(fdeps,"%s\n",deplibs) == 1)
depsmeta->depscnt++;
+ if (deplibs != depfile)
+ free(deplibs);
+
ret = ferror(fdeps) ? -1 : 0;
fclose(fdeps);