Skip to content

Commit 02a7184

Browse files
Fix Potential Handler Leaks #2
Add fclose before function out
1 parent fd735fc commit 02a7184

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kubernetes/config/kube_config_yaml.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ int kubeyaml_save_kubeconfig(const kubeconfig_t * kubeconfig)
10651065
/* Initialize the emitter object. */
10661066
if (!yaml_emitter_initialize(&emitter)) {
10671067
fprintf(stderr, "%s: Could not initialize the emitter object\n", fname);
1068+
fclose(output);
10681069
return -1;
10691070
}
10701071

0 commit comments

Comments
 (0)