summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-11 19:44:58 +0200
committerGitHub <noreply@github.com>2019-08-11 19:44:58 +0200
commit146719718e24864a261ba27a2ad1ad81581de0dd (patch)
treeb30aee53084e702821aa6f98b45f1dcfb08286dd
parent7bbaa36a13a831fa5804f388a23522a5303dd9db (diff)
parent4d3cf9b5762aae63f4d11a11f01520f66b93eda8 (diff)
downloadpodman-146719718e24864a261ba27a2ad1ad81581de0dd.tar.gz
podman-146719718e24864a261ba27a2ad1ad81581de0dd.tar.bz2
podman-146719718e24864a261ba27a2ad1ad81581de0dd.zip
Merge pull request #3782 from eriksjolund/fix_realloc_in_rootless_linux.c
Fix incorrect use of realloc()
-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 20c68db0f..94933ddd0 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;