cleanup #defines of cleanup()
authorJohn Kohl <jtkohl@mit.edu>
Mon, 26 Mar 1990 16:51:05 +0000 (16:51 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Mon, 26 Mar 1990 16:51:05 +0000 (16:51 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@419 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/do_as_req.c
src/kdc/do_tgs_req.c

index 53978b4e2c2b029b8fa4f1fe94d62ef80a8681d3..ff554f348ba5c227cf728e65920ce6a4c71a652a 100644 (file)
@@ -112,7 +112,11 @@ krb5_data **response;                      /* filled in with a response packet */
     }
 
 #undef cleanup
-#define cleanup() {krb5_db_free_principal(&client, 1); krb5_db_free_principal(&server, 1); bzero((char *)session_key->contents, session_key->length); free((char *)session_key->contents); session_key->contents = 0; }
+#define cleanup() {krb5_db_free_principal(&client, 1); \
+                  krb5_db_free_principal(&server, 1); \
+                  bzero((char *)session_key->contents, session_key->length); \
+                  free((char *)session_key->contents); \
+                  session_key->contents = 0; }
 
 
     ticket_reply.server = request->server;
@@ -215,8 +219,13 @@ krb5_data **response;                      /* filled in with a response packet */
     krb5_db_free_principal(&server, 1);
 
 #undef cleanup
-#define cleanup() {krb5_db_free_principal(&client, 1);bzero((char *)session_key->contents, session_key->length); free((char *)session_key->contents); session_key->contents = 0; bzero(ticket_reply.enc_part.data, ticket_reply.enc_part.length); free(ticket_reply.enc_part.data);}
-
+#define cleanup() {krb5_db_free_principal(&client, 1); \
+                  bzero((char *)session_key->contents, session_key->length); \
+                  free((char *)session_key->contents); \
+                  session_key->contents = 0; \
+                  bzero(ticket_reply.enc_part.data, \
+                        ticket_reply.enc_part.length); \
+                  free(ticket_reply.enc_part.data);}
 
     /* Start assembling the response */
     reply.client = request->client;
index 41952f93288a1c7f6b63cefb0e8d27e2ad83b451..39f1faa2605571d34264fae86b655ff716217569 100644 (file)
@@ -129,7 +129,13 @@ krb5_data **response;                      /* filled in with a response packet */
     }
 
 #undef cleanup
-#define cleanup() {krb5_db_free_principal(&server, 1); bzero((char *)session_key->contents, session_key->length); free((char *)session_key->contents); session_key->contents = 0; if (second_ticket) {krb5_free_enc_tkt_part(second_ticket->enc_part2); second_ticket->enc_part2 = 0;}}
+#define cleanup() {krb5_db_free_principal(&server, 1); \
+                  bzero((char *)session_key->contents, session_key->length); \
+                  free((char *)session_key->contents); \
+                  session_key->contents = 0; \
+                  if (second_ticket) { \
+                      krb5_free_enc_tkt_part(second_ticket->enc_part2); \
+                      second_ticket->enc_part2 = 0;}}
 
     ticket_reply.server = realreq->server; /* XXX careful for realm... */
     ticket_reply.etype = realreq->etype;
@@ -312,7 +318,14 @@ krb5_data **response;                      /* filled in with a response packet */
        newtransited = 1;
     }
 #undef cleanup
-#define cleanup() {krb5_db_free_principal(&server, 1); bzero((char *)session_key->contents, session_key->length);free((char *)session_key->contents); session_key->contents = 0; if (second_ticket) {krb5_free_enc_tkt_part(second_ticket->enc_part2); second_ticket->enc_part2 = 0;} if (newtransited) free(enc_tkt_reply.transited.data);}
+#define cleanup() {krb5_db_free_principal(&server, 1); \
+                  bzero((char *)session_key->contents, session_key->length); \
+                  free((char *)session_key->contents); \
+                  session_key->contents = 0; \
+                  if (second_ticket) { \
+                      krb5_free_enc_tkt_part(second_ticket->enc_part2); \
+                      second_ticket->enc_part2 = 0;} \
+                  if (newtransited) free(enc_tkt_reply.transited.data);}
 
     ticket_reply.enc_part2 = &enc_tkt_reply;
     if (isflagset(realreq->kdc_options, KDC_OPT_ENC_TKT_IN_SKEY)) {