From 4d3cf9b5762aae63f4d11a11f01520f66b93eda8 Mon Sep 17 00:00:00 2001 From: Erik Sjölund Date: Sun, 11 Aug 2019 15:58:20 +0200 Subject: Fix incorrect use of realloc() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Erik Sjölund --- pkg/rootless/rootless_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/rootless/rootless_linux.c') diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index f5d7e4711..2d1a1290a 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -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; -- cgit v1.2.3-54-g00ecf