about summary refs log tree commit diff
path: root/converter/other/pamtotga.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other/pamtotga.c')
-rw-r--r--converter/other/pamtotga.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/converter/other/pamtotga.c b/converter/other/pamtotga.c
index 1e0808ed..6c8769ed 100644
--- a/converter/other/pamtotga.c
+++ b/converter/other/pamtotga.c
@@ -461,7 +461,8 @@ computeTgaHeader(struct pam *          const pamP,
 static void
 releaseTgaHeader(struct ImageHeader const tgaHeader) {
 
-    strfree(tgaHeader.Id);
+    if (tgaHeader.IdLength > 0)
+        strfree(tgaHeader.Id);
 }