Bug 93588 - avoid redundant NULL check for 'module'
Summary: avoid redundant NULL check for 'module'
Status: RESOLVED FIXED
Alias: None
Product: p11-glue
Classification: Unclassified
Component: p11-kit (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-05 10:19 UTC by Pankaj
Modified: 2016-12-13 14:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Redundant check for NULL (361 bytes, text/plain)
2016-01-05 10:19 UTC, Pankaj
Details

Description Pankaj 2016-01-05 10:19:55 UTC
Created attachment 120809 [details]
Redundant check for NULL

Hi,
there is already checked 'module' for NULL at line 
p11-kit/modules.c:2654 .So need to check again for NULL
the respective patch has been attached please review it .
======================================================
diff --git a/p11-kit/modules.c b/p11-kit/modules.c
index 63baeb1..71e1850 100644
--- a/p11-kit/modules.c
+++ b/p11-kit/modules.c
@@ -2673,7 +2673,7 @@ p11_kit_load_initialize_module (const char *module_path,
                        }
                }

-               if (rv == CKR_OK && module) {
+               if (rv == CKR_OK) {
                        *module = unmanaged_for_module_inlock (mod);
                        assert (*module != NULL);
                }

-----------------------------------------------------

Thanks!
Pankaj Sharma


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.