projects
/
gssweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
73dc00a
)
Moving the cmd cleanup back to the error path, as the cmd was used later in the succe...
author
Mark Donnelly
<mark@painless-security.com>
Thu, 16 Jul 2015 15:06:35 +0000
(11:06 -0400)
committer
Mark Donnelly
<mark@painless-security.com>
Thu, 16 Jul 2015 15:06:35 +0000
(11:06 -0400)
json_gssapi/src/GSSRequest.cpp
patch
|
blob
|
history
diff --git
a/json_gssapi/src/GSSRequest.cpp
b/json_gssapi/src/GSSRequest.cpp
index
d7d3c07
..
38e6793
100644
(file)
--- a/
json_gssapi/src/GSSRequest.cpp
+++ b/
json_gssapi/src/GSSRequest.cpp
@@
-74,6
+74,13
@@
void GSSRequest::execute()
}
catch (GSSException e)
{
}
catch (GSSException e)
{
+ /* Cleanup */
+ if ( NULL != cmd )
+ {
+ delete(cmd);
+ cmd = NULL;
+ }
+
JSONObject return_values;
return_values.set("major_status", e.getMajor());
return_values.set("minor_status", e.getMinor());
JSONObject return_values;
return_values.set("major_status", e.getMajor());
return_values.set("minor_status", e.getMinor());
@@
-82,6
+89,13
@@
void GSSRequest::execute()
}
catch (std::invalid_argument e)
{
}
catch (std::invalid_argument e)
{
+ /* Cleanup */
+ if ( NULL != cmd )
+ {
+ delete(cmd);
+ cmd = NULL;
+ }
+
JSONObject return_values, errors;
errors.set("major_status_message", "An error occurred in parsing the JSON arguments.\0");
errors.set("minor_status_message", e.what());
JSONObject return_values, errors;
errors.set("major_status_message", "An error occurred in parsing the JSON arguments.\0");
errors.set("minor_status_message", e.what());
@@
-91,13
+105,6
@@
void GSSRequest::execute()
response.set("return_values", return_values);
}
response.set("return_values", return_values);
}
- /* Cleanup */
- if ( NULL != cmd )
- {
- delete(cmd);
- cmd = NULL;
- }
-
/* return */
}
/* return */
}