From 0d780fe6b8734ac5179ad9f863593d976e6e304f Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 10 Jun 2009 15:24:14 +0200 Subject: [PATCH] Free pointer with delete, since created with new --- src/file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file.cc b/src/file.cc index 2f7dbeb338..fc8af092a2 100644 --- a/src/file.cc +++ b/src/file.cc @@ -45,8 +45,8 @@ do { \ TryCatch try_catch; \ (*callback)->Call(Context::GetCurrent()->Global(), argc, argv); \ if(try_catch.HasCaught()) \ - node::FatalException(try_catch); \ - free(callback); \ + node::FatalException(try_catch); \ + delete callback; \ } \ } while(0)