Don't leak string in parse_define(..) when a macro has been found

and the parser token != TOK_ASSIGN

MFC after: 1 week
CID: 1007187, 1007188
Reported by: Coverity
Obtained from: Isilon OneFS (part of r445479)
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2016-04-22 05:14:12 +00:00
parent a301ee66ba
commit f517a30206

View File

@ -1150,7 +1150,8 @@ parse_define(const char *varname)
free(m->value);
m->value = string;
m->length = length;
}
} else
free(string);
}
token = TOK_EOL;