Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
51b75efb
Commit
51b75efb
authored
12 years ago
by
Andreas Schenk
Browse files
Options
Downloads
Patches
Plain Diff
fixed small memory leak in png io
parent
bdbb502c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/io/src/img/map_io_png_handler.cc
+3
-3
3 additions, 3 deletions
modules/io/src/img/map_io_png_handler.cc
with
3 additions
and
3 deletions
modules/io/src/img/map_io_png_handler.cc
+
3
−
3
View file @
51b75efb
...
...
@@ -226,12 +226,12 @@ void MapIOPngHandler::Export(const img::MapHandle& image, std::ostream& f,const
info_ptr
=
png_create_info_struct
(
png_ptr
);
if
(
info_ptr
==
NULL
)
{
png_destroy_
read
_struct
(
&
png_ptr
,
(
png_infopp
)
NULL
,
(
png_infopp
)
NULL
);
png_destroy_
write
_struct
(
&
png_ptr
,
(
png_infopp
)
NULL
);
throw
IOException
(
"png: error creating info_struct"
);
}
if
(
setjmp
(
png_jmpbuf
(
png_ptr
)))
{
png_destroy_
read
_struct
(
&
png_ptr
,
&
info_ptr
,
(
png_infopp
)
NULL
);
png_destroy_
write
_struct
(
&
png_ptr
,
&
info_ptr
);
throw
IOException
(
"png: error setting jmpbuf"
);
}
...
...
@@ -293,7 +293,7 @@ void MapIOPngHandler::Export(const img::MapHandle& image, std::ostream& f,const
png_write_end
(
png_ptr
,
info_ptr
);
png_destroy_write_struct
(
&
png_ptr
,
(
png_infopp
)
NULL
);
png_destroy_write_struct
(
&
png_ptr
,
&
info_ptr
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment