summaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless_linux.c
diff options
context:
space:
mode:
authorErik Sjölund <erik.sjolund@gmail.com>2019-08-11 15:58:20 +0200
committerErik Sjölund <erik.sjolund@gmail.com>2019-08-11 15:58:20 +0200
commit4d3cf9b5762aae63f4d11a11f01520f66b93eda8 (patch)
tree508aa23761eca1c9db53eb063c4fb70326b861dd /pkg/rootless/rootless_linux.c
parent3bc861cb110603ab9ece8526a4a962a31222add4 (diff)
downloadpodman-4d3cf9b5762aae63f4d11a11f01520f66b93eda8.tar.gz
podman-4d3cf9b5762aae63f4d11a11f01520f66b93eda8.tar.bz2
podman-4d3cf9b5762aae63f4d11a11f01520f66b93eda8.zip
Fix incorrect use of realloc()
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
Diffstat (limited to 'pkg/rootless/rootless_linux.c')
-rw-r--r--pkg/rootless/rootless_linux.c2
1 files changed, 1 insertions, 1 deletions
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;