Skip to content

Commit f0a089a

Browse files
authored
Merge pull request #30 from coiby/covscan_fix_part3
fix "src/dmidecodemodule.c:828:9 warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL opt where non-null expected"
2 parents 516a9bd + 4670382 commit f0a089a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/dmidecodemodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,9 @@ initdmidecodemod(void)
825825
xmlXPathInit();
826826

827827
opt = (options *) malloc(sizeof(options)+2);
828+
if (opt == NULL)
829+
MODINITERROR;
830+
828831
memset(opt, 0, sizeof(options)+2);
829832
init(opt);
830833
#ifdef IS_PY3K

0 commit comments

Comments
 (0)