[asterisk-commits] dlee: branch dlee/ari-authn r393206 - /team/dlee/ari-authn/main/http.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 28 14:52:02 CDT 2013


Author: dlee
Date: Fri Jun 28 14:52:00 2013
New Revision: 393206

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393206
Log:
auth_dtor not needed anymore

Modified:
    team/dlee/ari-authn/main/http.c

Modified: team/dlee/ari-authn/main/http.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ari-authn/main/http.c?view=diff&rev=393206&r1=393205&r2=393206
==============================================================================
--- team/dlee/ari-authn/main/http.c (original)
+++ team/dlee/ari-authn/main/http.c Fri Jun 28 14:52:00 2013
@@ -867,14 +867,6 @@
 	return cookies;
 }
 
-static void auth_dtor(void *obj)
-{
-	struct ast_http_auth *auth = obj;
-
-	ast_free(auth->userid);
-	ast_free(auth->password);
-}
-
 static struct ast_http_auth *auth_create(const char *userid,
 	const char *password)
 {
@@ -891,7 +883,7 @@
 	password_len = strlen(password) + 1;
 
 	/* Allocate enough room to store everything in one memory block */
-	auth = ao2_alloc(sizeof(*auth) + userid_len + password_len, auth_dtor);
+	auth = ao2_alloc(sizeof(*auth) + userid_len + password_len, NULL);
 	if (!auth) {
 		return NULL;
 	}




More information about the asterisk-commits mailing list