Browse code

misctest: close file if buffer size is not enough

Daniel-Constantin Mierla authored on 12/09/2021 10:09:38
Showing 1 changed files
... ...
@@ -294,6 +294,7 @@ static int misctest_message_init(void)
294 294
 
295 295
 		if(fsize>=BUF_SIZE-2) {
296 296
 			LM_ERR("the file data is too big\n");
297
+			fclose(f);
297 298
 			return -1;
298 299
 
299 300
 		}