aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/lib
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-05-22 10:33:25 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-05-22 10:33:25 +0000
commit6950a26a505b7d4457fe56fa8f51c9d1f158b2b2 (patch)
treef06c1efbc4c8d6722f2e40bc7ea324c276e15618 /usr.sbin/pkg_install/lib
parentb9f63041413d0249a7e874a7376bfef8447405b2 (diff)
Notes
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r--usr.sbin/pkg_install/lib/match.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/lib/match.c b/usr.sbin/pkg_install/lib/match.c
index fd96f3f927a8..cf745c32105c 100644
--- a/usr.sbin/pkg_install/lib/match.c
+++ b/usr.sbin/pkg_install/lib/match.c
@@ -297,11 +297,12 @@ storecreate(struct store *store)
}
store->currlen = 0;
store->store = NULL;
- } else
- if (store->store != NULL)
+ } else if (store->store != NULL) {
/* Free previously allocated memory */
for (i = 0; store->store[i] != NULL; i++)
free(store->store[i]);
+ store->store[0] = NULL;
+ }
store->used = 0;
return store;