json/util: simplify if (p) free(p) -> free(p)
Change-Id: I874b9893afcf2bdf333b14557feedcacad47d355 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
a6e713d8a1
commit
46af047ae7
@ -283,9 +283,7 @@ spdk_json_decode_string(const struct spdk_json_val *val, void *out)
|
|||||||
{
|
{
|
||||||
char **s = out;
|
char **s = out;
|
||||||
|
|
||||||
if (*s) {
|
free(*s);
|
||||||
free(*s);
|
|
||||||
}
|
|
||||||
|
|
||||||
*s = spdk_json_strdup(val);
|
*s = spdk_json_strdup(val);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user