pg: fix memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
c1253a3b10
commit
765056b372
|
@ -569,8 +569,10 @@ static int getcount(char *cmdstr)
|
|||
} else
|
||||
*(buf + strlen(buf) - 1) = '\0';
|
||||
}
|
||||
if (*buf == '\0')
|
||||
if (*buf == '\0') {
|
||||
free(buf);
|
||||
return 1;
|
||||
}
|
||||
if (buf[0] == '-' && buf[1] == '\0') {
|
||||
i = -1;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue