Permalink
Browse files

msXmpWrite(): fix use-after-free when a xmp_ metadata is using an unk…

…nown workspace
  • Loading branch information...
1 parent b18cac6 commit bb95b90a85c063c2efcc8a5d2af612fc8fa76638 @rouault rouault committed Jul 16, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 mapxmp.c
View
@@ -248,12 +248,12 @@ msXmpWrite( mapObj *map, const char *filename )
}
/* Or perhaps we're screwed. */
else {
- msFreeHashItems(&hash_ns);
- msFree(ns_name);
- msFree(ns_tag);
msSetError( MS_MISCERR,
"Unable to identify XMP namespace '%s' in metadata key '%s'",
"msXmpWrite()", ns_name, key );
+ msFreeHashItems(&hash_ns);
+ msFree(ns_name);
+ msFree(ns_tag);
return MS_FAILURE;
}
msFree(ns_name);

0 comments on commit bb95b90

Please sign in to comment.