Since
60623a7c, @temp_file was not properly free'd on the non error path.
Found by Coverity.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
static int
openvzWriteConfigParam(const char * conf_file, const char *param, const char *value)
{
- char * temp_file = NULL;
+ g_autofree char *temp_file = NULL;
int temp_fd = -1;
FILE *fp;
char *line = NULL;
VIR_FORCE_CLOSE(temp_fd);
if (temp_file)
unlink(temp_file);
- VIR_FREE(temp_file);
return -1;
}