From d4ba486cc6aacbbed2be1e71ea77410052a22ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 7 Oct 2015 16:32:36 +0200 Subject: Imported Upstream version 0.8.3 --- src/UriNormalize.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/UriNormalize.c') diff --git a/src/UriNormalize.c b/src/UriNormalize.c index dbbc23e..49db9ff 100644 --- a/src/UriNormalize.c +++ b/src/UriNormalize.c @@ -424,9 +424,11 @@ static URI_INLINE UriBool URI_FUNC(MakeOwner)(URI_TYPE(Uri) * uri, if ((*doneMask & URI_NORMALIZE_PATH) == 0) { while (walker != NULL) { if (!URI_FUNC(MakeRangeOwner)(doneMask, 0, &(walker->text))) { - /* Kill path to one before walker */ + /* Free allocations done so far and kill path */ + + /* Kill path to one before walker (if any) */ URI_TYPE(PathSegment) * ranger = uri->pathHead; - while (ranger->next != walker) { + while (ranger != walker) { URI_TYPE(PathSegment) * const next = ranger->next; if ((ranger->text.first != NULL) && (ranger->text.afterLast != NULL) -- cgit v1.2.3