summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-01-28 17:07:42 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-01-28 17:07:42 +0200
commit06a2f1269b035a3a76464149834f2a5a8c4e89f2 (patch)
treed5d11a7900d974196484e2ad984321a8e6d47298 /lib/psm.c
parent5e4fb2589ca19b7844f420affe9977c04a124469 (diff)
downloadlibrpm-tizen-06a2f1269b035a3a76464149834f2a5a8c4e89f2.tar.gz
librpm-tizen-06a2f1269b035a3a76464149834f2a5a8c4e89f2.tar.bz2
librpm-tizen-06a2f1269b035a3a76464149834f2a5a8c4e89f2.zip
Don't assume rpmfiNew() always succeeds
- Add NULL checks and add/adjust comments where appropriate. - The remaining callers should handle NULL fi gracefully if not entirely correctly: rpmfiFC() returns 0 on NULL fi, so these callers just see the erronous file info set as "no files" case. Something to fine-tune later...
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/psm.c b/lib/psm.c
index c40eee76c..ca31d1b91 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -322,7 +322,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_KEEPHEADER);
h = headerFree(h);
- if (fi == NULL) { /* XXX can't happen */
+ if (fi == NULL) {
goto exit;
}
fi->apath = filenames.data; /* Ick */