mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
Merge pull request #2163 from rhatdan/coverity
Cleanup coverity scan issues
This commit is contained in:
@ -70,9 +70,12 @@ get_cmd_line_args (pid_t pid)
|
||||
if (allocated == used)
|
||||
{
|
||||
allocated += 512;
|
||||
buffer = realloc (buffer, allocated);
|
||||
if (buffer == NULL)
|
||||
return NULL;
|
||||
char *tmp = realloc (buffer, allocated);
|
||||
if (buffer == NULL) {
|
||||
free(buffer);
|
||||
return NULL;
|
||||
}
|
||||
buffer=tmp;
|
||||
}
|
||||
}
|
||||
close (fd);
|
||||
|
Reference in New Issue
Block a user