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:
Daniel Verkamp 2017-05-01 18:05:42 -07:00 committed by Jim Harris
parent a6e713d8a1
commit 46af047ae7

View File

@ -283,9 +283,7 @@ spdk_json_decode_string(const struct spdk_json_val *val, void *out)
{
char **s = out;
if (*s) {
free(*s);
}
free(*s);
*s = spdk_json_strdup(val);