aboutsummaryrefslogtreecommitdiffstats
path: root/common/dotlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/dotlock.c')
-rw-r--r--common/dotlock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/dotlock.c b/common/dotlock.c
index f4d7243e0..06e3910ad 100644
--- a/common/dotlock.c
+++ b/common/dotlock.c
@@ -1155,7 +1155,6 @@ dotlock_destroy_unix (dotlock_t h)
unlink (h->lockname);
if (h->tname && !h->use_o_excl)
unlink (h->tname);
- xfree (h->tname);
}
#endif /*HAVE_POSIX_SYSTEM*/
@@ -1208,8 +1207,12 @@ dotlock_destroy (dotlock_t h)
#else /* !HAVE_DOSISH_SYSTEM */
dotlock_destroy_unix (h);
#endif /* HAVE_DOSISH_SYSTEM */
- xfree (h->lockname);
}
+
+#ifdef HAVE_POSIX_SYSTEM
+ xfree (h->tname);
+#endif
+ xfree (h->lockname);
xfree(h);
}