Misplaced assert
- we only care about non-NULL data if we're supposed to free the contents
This commit is contained in:
parent
82b89c3b0c
commit
1c80801ab6
|
@ -40,8 +40,8 @@ void rpmtdFreeData(rpmtd td)
|
||||||
assert(td != NULL);
|
assert(td != NULL);
|
||||||
|
|
||||||
if (td->flags & RPMTD_ALLOCED) {
|
if (td->flags & RPMTD_ALLOCED) {
|
||||||
assert(td->data != NULL);
|
|
||||||
if (td->flags & RPMTD_PTR_ALLOCED) {
|
if (td->flags & RPMTD_PTR_ALLOCED) {
|
||||||
|
assert(td->data != NULL);
|
||||||
char **data = td->data;
|
char **data = td->data;
|
||||||
for (int i = 0; i < td->count; i++) {
|
for (int i = 0; i < td->count; i++) {
|
||||||
free(data[i]);
|
free(data[i]);
|
||||||
|
|
Loading…
Reference in New Issue