libsemanage: semanage_store: fix segfault introduced to fix memory leak

In the patch to fix a minor memory leak, I introduced a garuanteed
segfault.  The point to the stack variable will never be NULL, whereas
the value on the stack will be.

Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
Eric Paris 2013-02-05 20:41:22 -05:00
parent e9410c9b06
commit 3f52a123af
1 changed files with 1 additions and 1 deletions

View File

@ -796,7 +796,7 @@ static int append_arg(char ***argv, int *num_args, const char *arg)
{ {
char **a; char **a;
a = realloc(argv, sizeof(**argv) * (*num_args + 1)); a = realloc(*argv, sizeof(**argv) * (*num_args + 1));
if (a == NULL) if (a == NULL)
return -1; return -1;