aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Meeuwissen <paddy-hack@member.fsf.org>2016-08-02 21:56:09 +0900
committerOlaf Meeuwissen <paddy-hack@member.fsf.org>2016-08-02 21:56:09 +0900
commit5389808029f0f81d204630f6e78abe11dfd61122 (patch)
tree2e55853d3f69c8a911c57dbbb8c9b900e270fdbd
parent1006445982877970d376c0f657e04fc1481e2459 (diff)
Fix memory leak
-rw-r--r--backend/dll.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/dll.c b/backend/dll.c
index d0b8065..2171c86 100644
--- a/backend/dll.c
+++ b/backend/dll.c
@@ -437,6 +437,8 @@ load (struct backend *be)
DBG (1, "load: malloc failed: %s\n", strerror (errno));
return SANE_STATUS_NO_MEM;
}
+ if (orig_src)
+ free (orig_src);
orig_src = src;
snprintf (src, src_len, "%s%s%s", path, DIR_SEP, LIBDIR);
}