The pointer parameter value of the free function may be NULL
Bug #1838001 reported by
xiaodonghu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Invalid
|
Low
|
Ambarish Das |
Bug Description
The function sprint_
So, the function fmtoid and fmtmsg_var may return NULL.
However, in these function log_results log_pdu_header and log_invalid_
In these function, snmp_log have checked whether var_str is NULL or not, but free doesn't check it.
When the var_str is NULL, free(NULL) will make the program crashed.
So we need to add the checking before free function.
description: | updated |
Changed in starlingx: | |
assignee: | xiaodonghu (xiaodonghu) → Ambarish Das (hiambar) |
To post a comment you must log in.
Fix proposed to branch: master /review. opendev. org/672935
Review: https:/