Commit 17e01f3
committed
fix "src/dmierror.c:55:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL buf where non-null expected"
Fix the following error found by covscan,
python-dmidecode-3.12.2/src/dmierror.c:55:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL buf where non-null expected
/usr/include/python3.9/Python.h:30: included_from: Included from here.
python-dmidecode-3.12.2/src/dmierror.c:32: included_from: Included from here.
/usr/include/string.h:61:14: note: argument 1 of ���memset��� must be non-null
# 53| va_start(ap, fmt);
# 54| buf = (char *) malloc(4098);
# 55|-> memset(buf, 0, 4098);
# 56|
# 57| if( buf == NULL ) {1 parent 70be832 commit 17e01f3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
0 commit comments