From 1dd1d68afe6dc55c37f1292250f1c26a5196ea0a Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Thu, 25 Sep 2008 19:32:27 +0200 Subject: Avoid segfault in rpmLeadNew() if calloc() fails --- lib/rpmlead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3