gss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gss/tests


From: gss-commit
Subject: CVS gss/tests
Date: Mon, 22 Nov 2004 00:42:45 +0100

Update of /home/cvs/gss/tests
In directory dopio:/tmp/cvs-serv11943

Modified Files:
        krb5context.c 
Log Message:
Don't use asprintf.


--- /home/cvs/gss/tests/krb5context.c   2004/10/14 17:17:32     1.13
+++ /home/cvs/gss/tests/krb5context.c   2004/11/21 23:42:44     1.14
@@ -85,19 +85,16 @@
       maj_stat = gss_display_status (&min_stat, code,
                                     type, GSS_C_NO_OID, &msg_ctx, &msg);
       if (GSS_ERROR (maj_stat))
+       printf ("GSS-API display_status failed on code %d type %d\n",
+               code, type);
+      else
        {
-         asprintf ((char **) &msg.value, "code %d", code);
-         msg.length = strlen (msg.value);
-       }
-
-      printf ("GSS-API error %s (%s): %.*s\n",
-             m, type == GSS_C_GSS_CODE ? "major" : "minor",
-             (int) msg.length, (char *) msg.value);
+         printf ("GSS-API error %s (%s): %.*s\n",
+                 m, type == GSS_C_GSS_CODE ? "major" : "minor",
+                 (int) msg.length, (char *) msg.value);
 
-      if (GSS_ERROR (maj_stat))
-       free (msg.value);
-      else
-       gss_release_buffer (&min_stat, &msg);
+         gss_release_buffer (&min_stat, &msg);
+       }
     }
   while (!GSS_ERROR (maj_stat) && msg_ctx);
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]