From 22dadd98646f75318412b54b3de90cc079d34b1d Mon Sep 17 00:00:00 2001 From: kuno Date: Sat, 22 Dec 2012 11:53:34 +0800 Subject: [PATCH] fix missmatch free/delete in org.cc --- src/org.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org.cc b/src/org.cc index a421214..b8009dc 100644 --- a/src/org.cc +++ b/src/org.cc @@ -70,14 +70,14 @@ Handle geoip::Org::lookupSync(const Arguments &args) { Local data; char host_cstr[host_str->Length()]; host_str->WriteAscii(host_cstr); - Org* o = ObjectWrap::Unwrap(args.This()); + Org * o = ObjectWrap::Unwrap(args.This()); uint32_t ipnum = _GeoIP_lookupaddress(host_cstr); if (ipnum <= 0) { return scope.Close(Null()); } - char *org = GeoIP_org_by_ipnum(o->db, ipnum); + char * org = GeoIP_org_by_ipnum(o->db, ipnum); if (org == NULL) { return scope.Close(Null()); } @@ -86,7 +86,7 @@ Handle geoip::Org::lookupSync(const Arguments &args) { data = String::New(name); - delete org; + free(org); free(name); return scope.Close(data);