]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
and some more
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 19 Apr 2018 06:53:39 +0000 (18:53 +1200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 19 Apr 2018 06:53:45 +0000 (18:53 +1200)
src/modules/rlm_eap/lib/sim/xlat.c

index f607b508637ca531cfac61bcb07bc1aff3ae9d54..5456e20eb9d4802a95885679f34682d984171b65 100644 (file)
@@ -240,13 +240,13 @@ static ssize_t sim_xlat_3gpp_pseudonym_decrypt(TALLOC_CTX *ctx, char **out, UNUS
        if (id_len != (SIM_3GPP_PSEUDONYM_LEN + 1)) {
                REDEBUG2("3gpp pseudonym incorrect length, expected %i bytes, got %zu bytes",
                         SIM_3GPP_PSEUDONYM_LEN + 1, id_len);
-               return -1;
+               goto error;
        }
 
        key_len = talloc_array_length(key);
        if (key_len != 16) {
                REDEBUG2("Decryption key incorrect length, expected %i bytes, got %zu bytes", 16, key_len);
-               return -1;
+               goto error;
        }
 
        tag = fr_sim_id_3gpp_pseudonym_tag(id);
@@ -265,13 +265,13 @@ static ssize_t sim_xlat_3gpp_pseudonym_decrypt(TALLOC_CTX *ctx, char **out, UNUS
 
        default:
                REDEBUG2("Unexpected tag value (%u) in SIM ID \"%pS\"", tag, id);
-               return -1;
+               goto error;
        }
 
        RDEBUG2("Decrypting \"%pS\"", id);
        if (fr_sim_id_3gpp_pseudonym_decrypt(decrypted, id, key) < 0) {
                RPEDEBUG2("Failed decrypting SIM ID");
-               return -1;
+               goto error;
        }
 
        /*