summaryrefslogtreecommitdiff
path: root/btt/plat.c
diff options
context:
space:
mode:
Diffstat (limited to 'btt/plat.c')
-rw-r--r--btt/plat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/btt/plat.c b/btt/plat.c
index e7b7dde..dff7115 100644
--- a/btt/plat.c
+++ b/btt/plat.c
@@ -42,6 +42,8 @@ void *plat_alloc(struct d_info *dip, char *post)
sprintf(oname, "%s%s_plat.dat", dip->dip_name, post);
if ((pp->fp = my_fopen(oname, "w")) == NULL) {
perror(oname);
+ free(oname);
+ free(pp);
return NULL;
}
add_file(pp->fp, oname);