diff options
author | Andrey Kiselev <dron@ak4719.spb.edu> | 2003-02-04 08:51:38 +0000 |
---|---|---|
committer | Andrey Kiselev <dron@ak4719.spb.edu> | 2003-02-04 08:51:38 +0000 |
commit | fe6e11556efe8a2271e8f5977f4f40fd18b3a820 (patch) | |
tree | 79976b75ecbbf8b96d7533990d9a0ef62c3127c5 /tools/raw2tiff.c | |
parent | be7810fc2c84343b1017319f9c690b428bd38af0 (diff) | |
download | libtiff-git-fe6e11556efe8a2271e8f5977f4f40fd18b3a820.tar.gz |
Memory leak fixed.
Diffstat (limited to 'tools/raw2tiff.c')
-rw-r--r-- | tools/raw2tiff.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/raw2tiff.c b/tools/raw2tiff.c index 0aae6545..ca4ea90a 100644 --- a/tools/raw2tiff.c +++ b/tools/raw2tiff.c @@ -1,11 +1,11 @@ -/* $Id: raw2tiff.c,v 1.2 2002-08-12 15:32:37 dron Exp $ +/* $Id: raw2tiff.c,v 1.3 2003-02-04 08:51:38 dron Exp $ * * Project: libtiff tools * Purpose: Convert raw byte sequences in TIFF images - * Author: Andrey Kiselev, a_kissel@eudoramail.com + * Author: Andrey Kiselev, dron@remotesensing.org * ****************************************************************************** - * Copyright (c) 2002, Andrey Kiselev <a_kissel@eudoramail.com> + * Copyright (c) 2002, Andrey Kiselev <dron@remotesensing.org> * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided @@ -63,7 +63,7 @@ main(int argc, char* argv[]) uint32 row, col, band; int c; - unsigned char *buf, *buf1; + unsigned char *buf = NULL, *buf1 = NULL; extern int optind; extern char* optarg; @@ -263,7 +263,11 @@ main(int argc, char* argv[]) break; } } - (void) TIFFClose(out); + if (buf) + _TIFFfree(buf); + if (buf1) + _TIFFfree(buf1); + TIFFClose(out); return (0); } |