From 7ef616f2685503193b0a36c24cdee3b21df8013e Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 10 Oct 2015 15:53:55 +0200 Subject: [PATCH] Delaying access to pointer until after NULL check. Coverity CID 12583. --- libisofs/ecma119_tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libisofs/ecma119_tree.c b/libisofs/ecma119_tree.c index 9e8ee52..cf4fb5d 100644 --- a/libisofs/ecma119_tree.c +++ b/libisofs/ecma119_tree.c @@ -410,11 +410,12 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree, int max_path; char *iso_name= NULL, *ipath = NULL; IsoFileSrc *src = NULL; - IsoWriteOpts *opts = image->opts; + IsoWriteOpts *opts; if (image == NULL || iso == NULL || tree == NULL) { return ISO_NULL_POINTER; } + opts = image->opts; *tree = NULL; hidden = flag & 1;