diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-05-22 10:33:25 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-05-22 10:33:25 +0000 |
commit | 5e6265b17ab8376cc4c41c5f3047a6627beed2a3 (patch) | |
tree | f06c1efbc4c8d6722f2e40bc7ea324c276e15618 /usr.sbin | |
parent | f37a06e269f4809be3f6a12d035b8d76fce0a638 (diff) | |
download | FreeBSD-src-5e6265b17ab8376cc4c41c5f3047a6627beed2a3.zip FreeBSD-src-5e6265b17ab8376cc4c41c5f3047a6627beed2a3.tar.gz |
Eliminate free'ing already freed chunks.
MFC after: 1 week
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_install/lib/match.c | 5 |
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 fd96f3f..cf745c3 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; |