Skip to content

Commit

Permalink
Free the newly allocated string, not the local buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeffenb committed Jun 22, 2017
1 parent 5aa0089 commit aaa4617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zl-util/STLString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void STLString::write_var ( cc8* format, va_list args ) {
this->append ( buffer );

if ( buffer != str ) {
free ( buffer );
free ( str );
}
}

Expand Down

0 comments on commit aaa4617

Please sign in to comment.