]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Initialize status in krb5_ldap_parse_db_params
authorGreg Hudson <ghudson@mit.edu>
Mon, 11 Mar 2013 20:09:06 +0000 (16:09 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 11 Mar 2013 20:09:06 +0000 (16:09 -0400)
If db_args is non-null but empty, status could be returned without
being initialized; gcc with optimization correctly warns about this,
causing a build failure.  (This bug was introduced by
0b1dc2f93da4c860dd27f1ac997617b712dff383 which was pushed after the
1.11 release branch, so it isn't in any release.)

src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c

index c4024b8d0705118223b6b5edd1905bdc890bfe0e..7659b9b929da21a1918690e45d35667dc7e3f1db 100644 (file)
@@ -233,7 +233,7 @@ krb5_error_code
 krb5_ldap_parse_db_params(krb5_context context, char **db_args)
 {
     char *opt = NULL, *val = NULL;
-    krb5_error_code status;
+    krb5_error_code status = 0;
     krb5_ldap_context *lctx = context->dal_handle->db_context;
 
     if (db_args == NULL)