summaryrefslogtreecommitdiffstats
path: root/sbin/dump/itime.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/dump/itime.c')
-rw-r--r--sbin/dump/itime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c
index 1f1a3e5..4cac87b 100644
--- a/sbin/dump/itime.c
+++ b/sbin/dump/itime.c
@@ -106,8 +106,10 @@ readdumptimes(FILE *df)
for (;;) {
dtwalk = (struct dumptime *)calloc(1, sizeof (struct dumptime));
- if (getrecord(df, &(dtwalk->dt_value)) < 0)
+ if (getrecord(df, &(dtwalk->dt_value)) < 0) {
+ free(dtwalk);
break;
+ }
nddates++;
SLIST_INSERT_HEAD(&dthead, dtwalk, dt_list);
}
OpenPOWER on IntegriCloud