diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-01-28 17:07:42 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-01-28 17:07:42 +0200 |
commit | 06a2f1269b035a3a76464149834f2a5a8c4e89f2 (patch) | |
tree | d5d11a7900d974196484e2ad984321a8e6d47298 /lib/psm.c | |
parent | 5e4fb2589ca19b7844f420affe9977c04a124469 (diff) | |
download | librpm-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ |