Fix Potential Handler Leaks #2

Add fclose before function out
This commit is contained in:
903d09f6-e821-4655-9e8b-7e6068b26f74
2024-07-23 10:21:12 +09:00
committed by GitHub
parent fd735fca4b
commit 02a71845ae

View File

@@ -1065,6 +1065,7 @@ int kubeyaml_save_kubeconfig(const kubeconfig_t * kubeconfig)
/* Initialize the emitter object. */
if (!yaml_emitter_initialize(&emitter)) {
fprintf(stderr, "%s: Could not initialize the emitter object\n", fname);
fclose(output);
return -1;
}