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);