Skip to content

Commit

Permalink
msXmpWrite(): fix use-after-free when a xmp_ metadata is using an unk…
Browse files Browse the repository at this point in the history
…nown workspace
  • Loading branch information
rouault committed Jul 16, 2013
1 parent b18cac6 commit bb95b90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mapxmp.c
Expand Up @@ -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);
Expand Down

0 comments on commit bb95b90

Please sign in to comment.