summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-04-19 16:04:11 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-04-19 16:04:11 +0300
commite336146a9ed6b28016e0dff68ea6979c3c9e5866 (patch)
tree8f2d402d52adf52c8b74c197e564ad862c6a13a4 /rpmio
parent5ad7fbda008cba771e09fe305a9b9db3dc5c6f06 (diff)
downloadrpm-e336146a9ed6b28016e0dff68ea6979c3c9e5866.tar.gz
rpm-e336146a9ed6b28016e0dff68ea6979c3c9e5866.tar.bz2
rpm-e336146a9ed6b28016e0dff68ea6979c3c9e5866.zip
Use argvFree() to free, well, an argv, instead of manual freeing
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/macro.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c
index e8fa20cf2..52f62b62d 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -1518,8 +1518,8 @@ rpmInitMacros(rpmMacroContext mc, const char * macrofiles)
mfiles = xstrdup(macrofiles);
for (m = mfiles; m && *m != '\0'; m = me) {
- char ** av;
- int ac;
+ ARGV_t av = NULL;
+ int ac = 0;
int i;
for (me = m; (me = strchr(me, ':')) != NULL; me++) {
@@ -1534,8 +1534,6 @@ rpmInitMacros(rpmMacroContext mc, const char * macrofiles)
me = m + strlen(m);
/* Glob expand the macro file path element, expanding ~ to $HOME. */
- ac = 0;
- av = NULL;
i = rpmGlob(m, &ac, &av);
if (i != 0)
continue;
@@ -1548,9 +1546,8 @@ rpmInitMacros(rpmMacroContext mc, const char * macrofiles)
continue;
}
(void) rpmLoadMacroFile(mc, av[i]);
- av[i] = _free(av[i]);
}
- av = _free(av);
+ argvFree(av);
}
mfiles = _free(mfiles);