Sitelet https://github.com/bmcdorman/jsoncpp/commit/fe2cd01e80d2d6f97ff9421ae56b29028edb9497
Skip to content

Commit fe2cd01

Browse files
Matthias Loycdunn2001
authored andcommitted
free does nothing if parameter equals NULL
1 parent b02ff20 commit fe2cd01

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/lib_json/json_value.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ static inline char *duplicateStringValue(const char *value,
105105
/** Free the string duplicated by duplicateStringValue().
106106
*/
107107
static inline void releaseStringValue(char *value) {
108-
if (value)
109-
free(value);
108+
free(value);
110109
}
111110

112111
} // namespace Json

0 commit comments

Comments
 (0)