diff --git a/FurnaceCreekInn1.jpg b/FurnaceCreekInn1.jpg new file mode 100644 index 00000000..7bafad77 Binary files /dev/null and b/FurnaceCreekInn1.jpg differ diff --git a/samples/geotag.cpp b/samples/geotag.cpp index e5ed73c7..dd471f36 100644 --- a/samples/geotag.cpp +++ b/samples/geotag.cpp @@ -807,12 +807,13 @@ int main(int argc,const char* argv[]) if ( options.verbose ) printf("%s %s ",arg,types[type]) ; if ( type == typeImage ) { time_t t = readImageTime(std::string(arg)) ; + char buffer[1024]; char* path = realpath(arg,NULL); if ( t && path ) { if ( options.verbose) printf("%s %ld %s",path,(long int)t,asctime(localtime(&t))); gFiles.push_back(path); } - if ( path ) :: free((void*) path); + if ( path && path != buffer ) :: free((void*) path); } if ( type == typeUnknown ) { fprintf(stderr,"error: illegal syntax %s\n",arg); diff --git a/test/data/FurnaceCreekInn2.jpg b/test/data/FurnaceCreekInn2.jpg new file mode 100644 index 00000000..4d6f3779 Binary files /dev/null and b/test/data/FurnaceCreekInn2.jpg differ diff --git a/test/data/FurnaceCreekInn3.jpg b/test/data/FurnaceCreekInn3.jpg new file mode 100644 index 00000000..ca2873c5 Binary files /dev/null and b/test/data/FurnaceCreekInn3.jpg differ