File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -229,8 +229,10 @@ int tst_output_printf(tst_output_stream * output,
229
229
msg = malloc (sizeof (char ) * 2048 );
230
230
count = vsnprintf (msg , 2047 , format , arglist );
231
231
/* Output was truncated */
232
- if (count >= 2047 )
232
+ if (count >= 2047 ) {
233
+ free (msg );
233
234
return -1 ;
235
+ }
234
236
tst_output_str_replace ("rank" , "<B>rank</B>$" , msg , & tmpstrptr );
235
237
free (msg );
236
238
tst_output_str_replace ("Rank" , "<B>Rank</B>" , tmpstrptr , & msg );
@@ -250,8 +252,10 @@ int tst_output_printf(tst_output_stream * output,
250
252
msg = malloc (sizeof (char ) * 2048 );
251
253
count = vsnprintf (msg , 2047 , format , arglist );
252
254
/* Output was truncated */
253
- if (count >= 2047 )
255
+ if (count >= 2047 ) {
256
+ free (msg );
254
257
return -1 ;
258
+ }
255
259
tst_output_latex_special_chars (msg , & tmpstrptr );
256
260
tst_output_str_replace ("<" , "$<$" , tmpstrptr , & msg );
257
261
free (tmpstrptr );
You can’t perform that action at this time.
0 commit comments