summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-01-16 11:23:44 +0700
committerGitHub <noreply@github.com>2018-01-16 11:23:44 +0700
commite582c0716847dfc29cd46ae652327766a8dc4bc4 (patch)
tree32081624d49b13c3874bbc045d07344ca29ccd8f
parent247e04c8a59b6e3b32d88fe6dac7bbb4948845a4 (diff)
parent0c5b32919e64e2fbdfd26e900f06eb29f47fc295 (diff)
downloadvyatta-cfg-helium.tar.gz
vyatta-cfg-helium.zip
Merge pull request #10 from genta/hotfix/cstore-memory-leakhelium
Fix memory leak in Cstore perl binding
-rw-r--r--perl_dmod/Cstore/Cstore.xs4
-rw-r--r--perl_dmod/Cstore/typemap6
2 files changed, 7 insertions, 3 deletions
diff --git a/perl_dmod/Cstore/Cstore.xs b/perl_dmod/Cstore/Cstore.xs
index 3c9a9ad..3626303 100644
--- a/perl_dmod/Cstore/Cstore.xs
+++ b/perl_dmod/Cstore/Cstore.xs
@@ -45,6 +45,10 @@ OUTPUT:
RETVAL
+void
+Cstore::DESTROY()
+
+
bool
Cstore::cfgPathExists(CPATH *pref, bool active_cfg)
PREINIT:
diff --git a/perl_dmod/Cstore/typemap b/perl_dmod/Cstore/typemap
index 8d6d178..7714cd1 100644
--- a/perl_dmod/Cstore/typemap
+++ b/perl_dmod/Cstore/typemap
@@ -12,7 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-Cstore * O_CPPOBJ
+Cstore * O_OBJECT
STRVEC * T_STRVEC_REF
CPATH * T_CPATH_REF
STRSTRMAP * T_STRSTRMAP_REF
@@ -20,7 +20,7 @@ STRSTRMAP * T_STRSTRMAP_REF
############################################################
OUTPUT
-O_CPPOBJ
+O_OBJECT
sv_setref_pv($arg, CLASS, (void *) $var);
T_STRVEC_REF
@@ -44,7 +44,7 @@ T_STRSTRMAP_REF
############################################################
INPUT
-O_CPPOBJ
+O_OBJECT
if (sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG)) {
$var = ($type) SvIV((SV *) SvRV($arg));
} else {