diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2015-03-16 21:24:16 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-03-16 22:40:55 +0100 |
commit | 6d009e32a59fe09f81e31e838f65869557ea72d6 (patch) | |
tree | 12829866c7e105fae6ec1185480c335773b645dd /__root__ | |
parent | 8708961c5a680838eec71ff76a57cd8ce338f044 (diff) | |
download | clufter-6d009e32a59fe09f81e31e838f65869557ea72d6.tar.gz clufter-6d009e32a59fe09f81e31e838f65869557ea72d6.tar.xz clufter-6d009e32a59fe09f81e31e838f65869557ea72d6.zip |
ccs-flatten/reslist.c: avoid NULL pointer deref
(found by static analysis)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '__root__')
-rw-r--r-- | __root__/ccs-flatten/reslist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/__root__/ccs-flatten/reslist.c b/__root__/ccs-flatten/reslist.c index 2787df5..d515d9b 100644 --- a/__root__/ccs-flatten/reslist.c +++ b/__root__/ccs-flatten/reslist.c @@ -1,5 +1,5 @@ /* - Copyright Red Hat, Inc. 2004 + Copyright 2015 Red Hat, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -505,10 +505,10 @@ load_resources(resource_t ** reslist, resource_rule_t ** rulelist) fprintf(stderr, "Error storing %s resource\n", newres->r_rule->rr_type); destroy_resource(newres); + } else { + /* Just information */ + newres->r_flags = RF_DEFINED; } - - /* Just information */ - newres->r_flags = RF_DEFINED; } } while (!list_done(rulelist, currule)) ; |