Permalink
Browse files

fix missmatch free/delete in org.cc

  • Loading branch information...
1 parent 1e28fec commit 22dadd98646f75318412b54b3de90cc079d34b1d kuno committed Dec 22, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/org.cc
View
6 src/org.cc
@@ -70,14 +70,14 @@ Handle<Value> geoip::Org::lookupSync(const Arguments &args) {
Local<Value> data;
char host_cstr[host_str->Length()];
host_str->WriteAscii(host_cstr);
- Org* o = ObjectWrap::Unwrap<geoip::Org>(args.This());
+ Org * o = ObjectWrap::Unwrap<geoip::Org>(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<Value> geoip::Org::lookupSync(const Arguments &args) {
data = String::New(name);
- delete org;
+ free(org);
free(name);
return scope.Close(data);

0 comments on commit 22dadd9

Please sign in to comment.