From: Panu Matilainen Date: Wed, 21 May 2008 09:41:31 +0000 (+0300) Subject: Misplaced assert X-Git-Tag: tznext/4.11.0.1.tizen20130304~4064 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c80801ab60e4f67b7b201dd983ed33d4297db38;p=tools%2Flibrpm-tizen.git Misplaced assert - we only care about non-NULL data if we're supposed to free the contents --- diff --git a/lib/rpmtd.c b/lib/rpmtd.c index 8948233..d1c49cf 100644 --- a/lib/rpmtd.c +++ b/lib/rpmtd.c @@ -40,8 +40,8 @@ void rpmtdFreeData(rpmtd td) assert(td != NULL); if (td->flags & RPMTD_ALLOCED) { - assert(td->data != NULL); if (td->flags & RPMTD_PTR_ALLOCED) { + assert(td->data != NULL); char **data = td->data; for (int i = 0; i < td->count; i++) { free(data[i]);