version: fix memory leak in early return
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
3446453c72
commit
ef0577e3d5
1 changed files with 2 additions and 1 deletions
|
@ -109,7 +109,8 @@ static int rpmvercmp(const char *a, const char *b)
|
||||||
|
|
||||||
/* If the separator lengths were different, we are also finished */
|
/* If the separator lengths were different, we are also finished */
|
||||||
if ((one - ptr1) != (two - ptr2)) {
|
if ((one - ptr1) != (two - ptr2)) {
|
||||||
return (one - ptr1) < (two - ptr2) ? -1 : 1;
|
ret = (one - ptr1) < (two - ptr2) ? -1 : 1;
|
||||||
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr1 = one;
|
ptr1 = one;
|
||||||
|
|
Loading…
Add table
Reference in a new issue