strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3e208f
)
imv-os: Properly free strings for invalid input in pacman
author
Tobias Brunner
<tobias@strongswan.org>
Thu, 27 Aug 2015 12:41:13 +0000
(14:41 +0200)
committer
Tobias Brunner
<tobias@strongswan.org>
Thu, 27 Aug 2015 12:42:05 +0000
(14:42 +0200)
src/libimcv/plugins/imv_os/pacman.c
patch
|
blob
|
history
diff --git
a/src/libimcv/plugins/imv_os/pacman.c
b/src/libimcv/plugins/imv_os/pacman.c
index
019e2ad
..
088313c
100644
(file)
--- a/
src/libimcv/plugins/imv_os/pacman.c
+++ b/
src/libimcv/plugins/imv_os/pacman.c
@@
-396,6
+396,17
@@
static void process_packages(char *filename, char *product, bool security)
pacman_state = PACMAN_STATE_BEGIN_PACKAGE;
}
}
+ switch (pacman_state)
+ {
+ case PACMAN_STATE_END_PACKAGE:
+ free(version);
+ /* fall-through */
+ case PACMAN_STATE_VERSION:
+ free(package);
+ break;
+ default:
+ break;
+ }
fclose(file);
db->destroy(db);