Index: authreg.c =================================================================== RCS file: /home/cvs/jabberd2/c2s/authreg.c,v retrieving revision 1.40.2.11 diff -u -r1.40.2.11 authreg.c --- c2s/authreg.c 30 Apr 2004 02:42:53 -0000 1.40.2.11 +++ c2s/authreg.c 20 Nov 2004 07:15:39 -0000 @@ -141,7 +141,7 @@ if((init)(ar) != 0) { log_write(c2s->log, LOG_ERR, "failed to initialise auth module '%s'", name); - free(ar); + authreg_free(ar); return NULL; } @@ -149,8 +149,7 @@ if(ar->user_exists == NULL) { log_write(c2s->log, LOG_ERR, "auth module '%s' has no check for user existence", name); - if(ar->free != NULL) (ar->free)(ar); - free(ar); + authreg_free(ar); return NULL; } Index: authreg_mysql.c =================================================================== RCS file: /home/cvs/jabberd2/c2s/authreg_mysql.c,v retrieving revision 1.8.2.4 diff -u -r1.8.2.4 authreg_mysql.c --- c2s/authreg_mysql.c 31 May 2004 23:01:24 -0000 1.8.2.4 +++ c2s/authreg_mysql.c 20 Nov 2004 07:15:40 -0000 @@ -365,6 +365,7 @@ /* configure the database context with field names and SQL statements */ mysqlcontext = (mysqlcontext_t) malloc( sizeof( struct mysqlcontext_st ) ); ar->private = mysqlcontext; + ar->free = _ar_mysql_free; /* determine our field names and table name */ username = _ar_mysql_param( ar->c2s->config @@ -500,7 +501,6 @@ ar->set_zerok = _ar_mysql_set_zerok; ar->create_user = _ar_mysql_create_user; ar->delete_user = _ar_mysql_delete_user; - ar->free = _ar_mysql_free; return 0; } Index: authreg_pgsql.c =================================================================== RCS file: /home/cvs/jabberd2/c2s/authreg_pgsql.c,v retrieving revision 1.11.2.3 diff -u -r1.11.2.3 authreg_pgsql.c --- c2s/authreg_pgsql.c 31 May 2004 23:01:24 -0000 1.11.2.3 +++ c2s/authreg_pgsql.c 20 Nov 2004 07:15:40 -0000 @@ -365,6 +365,7 @@ /* configure the database context with field names and SQL statements */ pgsqlcontext = (pgsqlcontext_t) malloc( sizeof( struct pgsqlcontext_st ) ); ar->private = pgsqlcontext; + ar->free = _ar_pgsql_free; /* determine our field names and table name */ username = _ar_pgsql_param( ar->c2s->config @@ -497,7 +498,6 @@ ar->set_zerok = _ar_pgsql_set_zerok; ar->create_user = _ar_pgsql_create_user; ar->delete_user = _ar_pgsql_delete_user; - ar->free = _ar_pgsql_free; return 0; }