remove the unused ptr reported at https://github.com/lionsoul2014/ip2region/issues/254
This commit is contained in:
parent
65edd65bcf
commit
6a6358af48
|
|
@ -275,7 +275,6 @@ XDB_PUBLIC(void) xdb_close_vector_index(void *ptr) {
|
||||||
XDB_PUBLIC(xdb_content_t *) xdb_load_content(FILE *handle) {
|
XDB_PUBLIC(xdb_content_t *) xdb_load_content(FILE *handle) {
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
xdb_content_t *content;
|
xdb_content_t *content;
|
||||||
char *ptr;
|
|
||||||
|
|
||||||
// determine the file size
|
// determine the file size
|
||||||
if (fseek(handle, 0, SEEK_END) == -1) {
|
if (fseek(handle, 0, SEEK_END) == -1) {
|
||||||
|
|
@ -303,7 +302,7 @@ XDB_PUBLIC(xdb_content_t *) xdb_load_content(FILE *handle) {
|
||||||
// read the content into the buffer
|
// read the content into the buffer
|
||||||
content->length = size;
|
content->length = size;
|
||||||
if (fread(content->buffer, 1, size, handle) != size) {
|
if (fread(content->buffer, 1, size, handle) != size) {
|
||||||
xdb_free(ptr);
|
xdb_free(content);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue