summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ImageMetaData.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ImageMetaData.cxx b/src/ImageMetaData.cxx
index 5f619d2..d79b937 100644
--- a/src/ImageMetaData.cxx
+++ b/src/ImageMetaData.cxx
@@ -18,6 +18,8 @@
#include "ImageMetaData.H"
ImageMetaData::ImageMetaData() {
+ manufacturer = NULL;
+ model = NULL;
clear();
}
@@ -28,7 +30,9 @@ ImageMetaData::~ImageMetaData() {
void
ImageMetaData::clear() {
+ if (manufacturer) free(manufacturer);
manufacturer = NULL;
+ if (model) free(model);
model = NULL;
longitude = NAN;
latitude = NAN;
@@ -49,8 +53,6 @@ int
ImageMetaData::load_image(char *name, int img_width) {
int ret;
- if (manufacturer) free(manufacturer);
- if (model) free(model);
clear();
ret = load_image_jpgcom(name);