mirror of https://github.com/ecmwf/eccodes.git
Memory leak
This commit is contained in:
parent
b86f47e43c
commit
6541872ca3
|
@ -482,13 +482,13 @@ static void dump_double(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comment)
|
||||
{
|
||||
grib_dumper_bufr_decode_C* self = (grib_dumper_bufr_decode_C*)d;
|
||||
char** values = NULL;
|
||||
size_t size = 0;
|
||||
grib_context* c = NULL;
|
||||
int err = 0;
|
||||
long count = 0;
|
||||
int r = 0;
|
||||
grib_handle* h = grib_handle_of_accessor(a);
|
||||
char** values;
|
||||
size_t size = 0, i = 0;
|
||||
grib_context* c = NULL;
|
||||
int err = 0;
|
||||
long count = 0;
|
||||
int r = 0;
|
||||
grib_handle* h = grib_handle_of_accessor(a);
|
||||
|
||||
c = a->context;
|
||||
|
||||
|
@ -542,6 +542,7 @@ static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comm
|
|||
depth -= 2;
|
||||
}
|
||||
|
||||
for (i = 0; i < size; i++) grib_context_free(c, values[i]);
|
||||
grib_context_free(c, values);
|
||||
(void)err; /* TODO */
|
||||
}
|
||||
|
|
|
@ -665,6 +665,7 @@ static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comm
|
|||
depth -= 2;
|
||||
}
|
||||
|
||||
for (i = 0; i < size; i++) grib_context_free(c, values[i]);
|
||||
grib_context_free(c, values);
|
||||
(void)err; /* TODO */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue