diff options
author | Kozlov Dmitry <dima@server> | 2010-10-18 19:19:59 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-10-18 19:19:59 +0400 |
commit | 27b190b7e4f3957fb923174774435832306938b2 (patch) | |
tree | b3fdba697e212abedc4a2857df97c99a1044e0f7 | |
parent | 5be33b2f6bb2c859357a877a4f1f94f4695fcd30 (diff) | |
download | accel-ppp-27b190b7e4f3957fb923174774435832306938b2.tar.gz accel-ppp-27b190b7e4f3957fb923174774435832306938b2.zip |
radius: fixed incorrect memore free when dictionary load failed
log: flush output immediatly on emergency logs
-rw-r--r-- | accel-pptpd/log.c | 1 | ||||
-rw-r--r-- | accel-pptpd/radius/dict.c | 2 | ||||
-rw-r--r-- | accel-pptpd/triton/triton.h | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/accel-pptpd/log.c b/accel-pptpd/log.c index 476c077..6fd60bc 100644 --- a/accel-pptpd/log.c +++ b/accel-pptpd/log.c @@ -198,6 +198,7 @@ void __export log_emerg(const char *fmt, ...) va_start(ap, fmt); vfprintf(emerg_file, fmt, ap); va_end(ap); + fflush(emerg_file); } } diff --git a/accel-pptpd/radius/dict.c b/accel-pptpd/radius/dict.c index 0d63a83..9704569 100644 --- a/accel-pptpd/radius/dict.c +++ b/accel-pptpd/radius/dict.c @@ -269,7 +269,7 @@ void rad_dict_free(struct rad_dict_t *dict) _free((char*)attr->name); _free(attr); } - _free(dict); + free(dict); } static struct rad_dict_attr_t *dict_find_attr(struct list_head *items, const char *name) diff --git a/accel-pptpd/triton/triton.h b/accel-pptpd/triton/triton.h index 4b4d9c4..f494bb3 100644 --- a/accel-pptpd/triton/triton.h +++ b/accel-pptpd/triton/triton.h @@ -111,6 +111,7 @@ void triton_terminate(void); #define __init __attribute__((constructor)) +#define __exit __attribute__((destructor)) #define __export __attribute__((visibility("default"))) #undef offsetof |