summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-09-07 14:03:47 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-09-07 14:03:47 +0300
commit429132522cbf52d4a062227eecc388854e253b94 (patch)
treefaa790607607d3bb368aed710c31609c08135021 /rpmio
parent712ee07e6155d12736989876eb8078355065b522 (diff)
downloadrpm-429132522cbf52d4a062227eecc388854e253b94.tar.gz
rpm-429132522cbf52d4a062227eecc388854e253b94.tar.bz2
rpm-429132522cbf52d4a062227eecc388854e253b94.zip
Avoid potentially calling a NULL function pointer
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/rpmio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
index 9711cff74..8b90d7226 100644
--- a/rpmio/rpmio.c
+++ b/rpmio/rpmio.c
@@ -1633,7 +1633,7 @@ DBGIO(fd, (stderr, "==> Fclose(%p) %s\n", (fd ? fd : NULL), fdbg(fd)));
}
} else {
fdio_close_function_t _close = FDIOVEC(fd, close);
- rc = _close(fd);
+ rc = _close ? _close(fd) : -2;
}
if (fd->nfps == 0)
break;