Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix missmatch free/delete in org.cc

  • Loading branch information...
commit 22dadd98646f75318412b54b3de90cc079d34b1d 1 parent 1e28fec
kuno authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 src/org.cc
6 src/org.cc
@@ -70,14 +70,14 @@ Handle<Value> geoip::Org::lookupSync(const Arguments &args) {
70 70 Local<Value> data;
71 71 char host_cstr[host_str->Length()];
72 72 host_str->WriteAscii(host_cstr);
73   - Org* o = ObjectWrap::Unwrap<geoip::Org>(args.This());
  73 + Org * o = ObjectWrap::Unwrap<geoip::Org>(args.This());
74 74
75 75 uint32_t ipnum = _GeoIP_lookupaddress(host_cstr);
76 76 if (ipnum <= 0) {
77 77 return scope.Close(Null());
78 78 }
79 79
80   - char *org = GeoIP_org_by_ipnum(o->db, ipnum);
  80 + char * org = GeoIP_org_by_ipnum(o->db, ipnum);
81 81 if (org == NULL) {
82 82 return scope.Close(Null());
83 83 }
@@ -86,7 +86,7 @@ Handle<Value> geoip::Org::lookupSync(const Arguments &args) {
86 86
87 87 data = String::New(name);
88 88
89   - delete org;
  89 + free(org);
90 90 free(name);
91 91
92 92 return scope.Close(data);

0 comments on commit 22dadd9

Please sign in to comment.
Something went wrong with that request. Please try again.