mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Free reference before returning result
This commit is contained in:
@@ -37,10 +37,14 @@ public:
|
||||
if (sha) {
|
||||
char oid[GIT_OID_HEXSZ + 1];
|
||||
git_oid_tostr(oid, GIT_OID_HEXSZ + 1, sha);
|
||||
git_reference_free(head);
|
||||
return CefV8Value::CreateString(oid);
|
||||
}
|
||||
}
|
||||
return CefV8Value::CreateString(git_reference_name(head));
|
||||
|
||||
CefRefPtr<CefV8Value> result = CefV8Value::CreateString(git_reference_name(head));
|
||||
git_reference_free(head);
|
||||
return result;
|
||||
}
|
||||
|
||||
return CefV8Value::CreateNull();
|
||||
|
||||
Reference in New Issue
Block a user