projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82b89c3
)
Misplaced assert
author
Panu Matilainen
<pmatilai@redhat.com>
Wed, 21 May 2008 09:41:31 +0000
(12:41 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Wed, 21 May 2008 09:41:31 +0000
(12:41 +0300)
- we only care about non-NULL data if we're supposed to free the contents
lib/rpmtd.c
patch
|
blob
|
history
diff --git
a/lib/rpmtd.c
b/lib/rpmtd.c
index
8948233
..
d1c49cf
100644
(file)
--- 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]);