From 96987afd73a68fd76b7135ea6b3a42733ecd2aae Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 28 Aug 2009 10:52:49 +0300 Subject: [PATCH] Don't try to incref NULL ds --- lib/rpmds.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/rpmds.c b/lib/rpmds.c index 5f3d303..732de38 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -162,16 +162,13 @@ rpmds rpmdsNew(Header h, rpmTag tagN, int flags) rpmtdFreeData(&buildtime); ds->Color = xcalloc(ds->Count, sizeof(*ds->Color)); ds->Refs = xcalloc(ds->Count, sizeof(*ds->Refs)); + ds = rpmdsLink(ds, ds->Type); if (_rpmds_debug < 0) fprintf(stderr, "*** ds %p\t%s[%d]\n", ds, ds->Type, ds->Count); - } exit: - /* FIX: ds->Flags may be NULL */ - ds = rpmdsLink(ds, (ds ? ds->Type : RPMDBG())); - return ds; } -- 2.7.4