diff options
author | Michael Schroeder <mls@suse.de> | 2011-07-14 11:37:01 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2011-07-14 11:37:01 +0200 |
commit | c4934b45d2b76cc445fe3915c0d7dbd00341119b (patch) | |
tree | 9b5a474b22de67fa48d006776ad1408ad4d8fd69 /examples | |
parent | 96d3ffea9f0ab1a454a9f48e698291d89d0ec22b (diff) | |
download | libsolv-c4934b45d2b76cc445fe3915c0d7dbd00341119b.tar.gz libsolv-c4934b45d2b76cc445fe3915c0d7dbd00341119b.tar.bz2 libsolv-c4934b45d2b76cc445fe3915c0d7dbd00341119b.zip |
- swig bug: can't overload __str__ in perl, causes memory corruption as it tries to stringify freed objects
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/p5solv | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/p5solv b/examples/p5solv index 08c96bc..804b864 100755 --- a/examples/p5solv +++ b/examples/p5solv @@ -123,14 +123,14 @@ sub usecachedrepo { return undef if sysread($f, $fextcookie, 32) != 32; } sysseek($f, 0, Fcntl::SEEK_SET); - $f = solv::xfopen_dup(undef, fileno($f)); + my $fd = solv::xfopen_dup(undef, fileno($f)); my $flags = $ext ? $solv::Repo::REPO_USE_LOADING|$solv::Repo::REPO_EXTEND_SOLVABLES : 0; $flags |= $solv::Repo::REPO_LOCALPOOL if $ext && $ext ne 'DL'; - if (!$self->{'handle'}->add_solv($f, $flags)) { - solv::xfclose($f); + if (!$self->{'handle'}->add_solv($fd, $flags)) { + solv::xfclose($fd); return undef; } - solv::xfclose($f); + solv::xfclose($fd); $self->{'cookie'} = $fcookie unless $ext; $self->{'extcookie'} = $fextcookie if $fextcookie; utime undef, undef, $f if $mark; |