diff options
author | Jindrich Novy <jnovy@redhat.com> | 2008-09-25 19:32:27 +0200 |
---|---|---|
committer | Jindrich Novy <jnovy@redhat.com> | 2008-09-25 20:03:50 +0200 |
commit | 1dd1d68afe6dc55c37f1292250f1c26a5196ea0a (patch) | |
tree | f4cd13c206f347965e4687188e0bf8cb8b7f34f2 /lib/rpmlead.c | |
parent | 50ef054902618edec7a29f5b3b5cb4ae2e12a20f (diff) | |
download | rpm-1dd1d68afe6dc55c37f1292250f1c26a5196ea0a.tar.gz rpm-1dd1d68afe6dc55c37f1292250f1c26a5196ea0a.tar.bz2 rpm-1dd1d68afe6dc55c37f1292250f1c26a5196ea0a.zip |
Avoid segfault in rpmLeadNew() if calloc() fails
Diffstat (limited to 'lib/rpmlead.c')
-rw-r--r-- | lib/rpmlead.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmlead.c b/lib/rpmlead.c index 805606aec..8bb8779bc 100644 --- a/lib/rpmlead.c +++ b/lib/rpmlead.c @@ -41,7 +41,7 @@ struct rpmlead_s { rpmlead rpmLeadNew(void) { int archnum, osnum; - rpmlead l = calloc(1, sizeof(*l)); + rpmlead l = xcalloc(1, sizeof(*l)); rpmGetArchInfo(NULL, &archnum); rpmGetOsInfo(NULL, &osnum); |