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:
parent
e9410c9b06
commit
3f52a123af
|
@ -796,7 +796,7 @@ static int append_arg(char ***argv, int *num_args, const char *arg)
|
|||
{
|
||||
char **a;
|
||||
|
||||
a = realloc(argv, sizeof(**argv) * (*num_args + 1));
|
||||
a = realloc(*argv, sizeof(**argv) * (*num_args + 1));
|
||||
if (a == NULL)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue