We now no longer retain pointers to this variable internally, so we can
unconditionally free it. Fixes #1543.
sz = fread(config_text, 1, config_st.st_size, f);
if (sz == 0) {
agerr(AGERR,"%s is zero sized, or other read error.\n", gvc->config_path);
- free(config_text);
}
else {
gvc->config_found = TRUE;
config_text[sz] = '\0'; /* make input into a null terminated string */
rc = gvconfig_plugin_install_from_config(gvc, config_text);
- /* NB. config_text not freed because we retain char* into it */
}
+ free(config_text);
}
if (f) {
fclose(f);