projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6055f4f
)
code cleanup; also noted potential memory issue in comment
author
Dan Breslau
<dbreslau@painless-security.com>
Fri, 28 Oct 2016 20:48:18 +0000
(16:48 -0400)
committer
Dan Breslau
<dbreslau@painless-security.com>
Fri, 28 Oct 2016 20:48:18 +0000
(16:48 -0400)
mech_eap/display_status.c
patch
|
blob
|
history
diff --git
a/mech_eap/display_status.c
b/mech_eap/display_status.c
index
ef28e76
..
eefcd60
100644
(file)
--- a/
mech_eap/display_status.c
+++ b/
mech_eap/display_status.c
@@
-137,13
+137,18
@@
gssEapSaveStatusInfo(OM_uint32 minor, const char *format, ...)
if (format != NULL) {
va_start(ap, format);
n = vasprintf(&s, format, ap);
- if (n == -1)
+ if (n == -1) {
+ if (s) {
+ free(s);
+ }
s = NULL;
+ }
va_end(ap);
- if (n == -1)
- s = NULL;
}
-
+ /* NOTE: saveStatusInfoNoCopy apparently expects the string to be allocated with
+ * GSSAPI_MALLOC, so perhaps we should copy the string via gssalloc_strdup or
+ * equivalent?
+ */
saveStatusInfoNoCopy(minor, s);
#endif /* WIN32 */
}