Memory leak fixed.
This commit is contained in:
parent
be7810fc2c
commit
fe6e11556e
@ -1,3 +1,7 @@
|
||||
2003-02-04 Andrey Kiselev <dron@remotesensing.org>
|
||||
|
||||
* tools/raw2tiff.c: Memory leak fixed.
|
||||
|
||||
2003-02-03 Andrey Kiselev <dron@remotesensing.org>
|
||||
|
||||
* tools/fax2tiff.c, man/fax2tiff.1: Applied patch from Julien Gaulmin
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user