Fix incorrect use of realloc()

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
This commit is contained in:
Erik Sjölund
2019-08-11 15:58:20 +02:00
parent 3bc861cb11
commit 4d3cf9b576

View File

@ -137,7 +137,7 @@ get_cmd_line_args (pid_t pid)
{
allocated += 512;
char *tmp = realloc (buffer, allocated);
if (buffer == NULL)
if (tmp == NULL)
{
free (buffer);
return NULL;