Skip to content

Commit

Permalink
msXmpWrite(): avoid false positive warning about nullptr deref (CID 1…
Browse files Browse the repository at this point in the history
…175242)
  • Loading branch information
rouault committed May 15, 2021
1 parent 35d4084 commit 55dcfd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mapxmp.c
Expand Up @@ -214,7 +214,7 @@ msXmpWrite( mapObj *map, const char *filename )

/* Check all the keys for "xmp_*_*" pattern */
key = msFirstKeyFromHashTable(&hash_metadata);
do {
for( ; key != NULL; key = msNextKeyFromHashTable(&hash_metadata, key) ) {
/* Our regex has two match slots */
regmatch_t matches[3];

Expand Down Expand Up @@ -259,7 +259,7 @@ msXmpWrite( mapObj *map, const char *filename )
msFree(ns_name);
msFree(ns_tag);
}
} while( (key = msNextKeyFromHashTable(&hash_metadata, key)) );
}

/* Clean up regex */
regfree(&xmp_regex);
Expand Down

0 comments on commit 55dcfd6

Please sign in to comment.