Free buffer in error case.

Found by scan-build.
cc @pmatos.
This commit is contained in:
Sam Tobin-Hochstadt 2020-04-02 19:36:30 -04:00 committed by Sam Tobin-Hochstadt
parent 36bb3bc21f
commit 92c1ba9a62

View File

@ -1949,8 +1949,10 @@ char *rktio_system_path(rktio_t *rktio, int which)
#else #else
return append_paths(home, "racket-prefs.rktd", 1, 0); return append_paths(home, "racket-prefs.rktd", 1, 0);
#endif #endif
} else } else {
free(home);
return strdup("/"); return strdup("/");
}
} }
#endif #endif