MISR Toolkit
1.5.1
Util
src
MtkDataBufferFree.c
Go to the documentation of this file.
1
/*===========================================================================
2
= =
3
= MtkDataBufferFree =
4
= =
5
=============================================================================
6
7
Jet Propulsion Laboratory
8
MISR
9
MISR Toolkit
10
11
Copyright 2005, California Institute of Technology.
12
ALL RIGHTS RESERVED.
13
U.S. Government Sponsorship acknowledged.
14
15
============================================================================*/
16
17
#include "
MisrUtil.h
"
18
#include "
MisrError.h
"
19
#include <stdlib.h>
20
33
MTKt_status
MtkDataBufferFree
(
34
MTKt_DataBuffer
*databuf )
35
{
36
MTKt_DataBuffer
dbuf =
MTKT_DATABUFFER_INIT
;
37
/* Data buffer structure */
38
39
if
(databuf == NULL)
40
return
MTK_SUCCESS
;
41
42
/* Free 2D buffer */
43
if
(!databuf->
imported
)
44
if
(databuf->
dataptr
!= NULL)
45
free(databuf->
dataptr
);
46
47
/* Free 1D Illiffe vector */
48
if
(databuf->
vdata
!= NULL)
49
free(databuf->
vdata
);
50
51
*databuf = dbuf;
52
53
return
MTK_SUCCESS
;
54
}
MTKt_DataBuffer
2-dimensional Data Buffer
Definition:
MisrUtil.h:98
MTKt_DataBuffer::vdata
void ** vdata
Definition:
MisrUtil.h:105
MtkDataBufferFree
MTKt_status MtkDataBufferFree(MTKt_DataBuffer *databuf)
Free data buffer.
Definition:
MtkDataBufferFree.c:33
MTKT_DATABUFFER_INIT
#define MTKT_DATABUFFER_INIT
Definition:
MisrUtil.h:109
MTK_SUCCESS
Definition:
MisrError.h:12
MTKt_DataBuffer::dataptr
void * dataptr
Definition:
MisrUtil.h:106
MisrError.h
MisrUtil.h
MTKt_status
MTKt_status
Definition:
MisrError.h:11
MTKt_DataBuffer::imported
MTKt_boolean imported
Definition:
MisrUtil.h:103
MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:51