projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd38203
)
login: fix invalid free() in sd_session_get_vt()
author
David Herrmann
<dh.herrmann@gmail.com>
Thu, 10 Oct 2013 11:09:37 +0000
(13:09 +0200)
committer
David Herrmann
<dh.herrmann@gmail.com>
Thu, 10 Oct 2013 11:14:18 +0000
(13:14 +0200)
We need to clear variables markes as _cleanup_free_. Otherwise, our
error-paths might corrupt random memory.
src/login/sd-login.c
patch
|
blob
|
history
diff --git
a/src/login/sd-login.c
b/src/login/sd-login.c
index
71d8c29
..
6c27dfe
100644
(file)
--- a/
src/login/sd-login.c
+++ b/
src/login/sd-login.c
@@
-350,7
+350,7
@@
_public_ int sd_session_get_tty(const char *session, char **tty) {
}
_public_ int sd_session_get_vt(const char *session, unsigned *vtnr) {
- _cleanup_free_ char *vtnr_string;
+ _cleanup_free_ char *vtnr_string
= NULL
;
unsigned u;
int r;