hp-3457a: free memory that was allocated by SCPI get routines
The SCPI get routines may allocate memory for response data which callers have to free after use. This addresses part of bug #1683.
This commit is contained in:
parent
c9cfcd2591
commit
1c50255506
|
@ -138,8 +138,10 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
|
||||||
if ((ret != SR_OK) || !response)
|
if ((ret != SR_OK) || !response)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (strcmp(response, "HP3457A"))
|
if (strcmp(response, "HP3457A")) {
|
||||||
|
g_free(response);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
g_free(response);
|
g_free(response);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue