version: fix memory leak in early return

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Dave Reisner 2014-11-18 09:02:05 -05:00 committed by Allan McRae
parent 3446453c72
commit ef0577e3d5

View file

@ -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;