diff --git a/res/res_convert.c b/res/res_convert.c
index ddcd01ae12d81357ad5eeaee018ce8181128277c..94d6e1e59c1038fcd0010ef276559e3dc3d9ef41 100644
--- a/res/res_convert.c
+++ b/res/res_convert.c
@@ -117,9 +117,11 @@ static char *handle_cli_file_convert(struct ast_cli_entry *e, int cmd, struct as
 	
 	while ((f = ast_readframe(fs_in))) {
 		if (ast_writestream(fs_out, f)) {
+			ast_frfree(f);
 			ast_cli(a->fd, "Failed to convert %s.%s to %s.%s!\n", name_in, ext_in, name_out, ext_out);
 			goto fail_out;
 		}
+		ast_frfree(f);
 	}
 
 	cost = ast_tvdiff_ms(ast_tvnow(), start);