]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix error return case in serialization code
authorGreg Hudson <ghudson@mit.edu>
Mon, 9 Dec 2019 16:33:57 +0000 (11:33 -0500)
committerGreg Hudson <ghudson@mit.edu>
Sun, 5 Jan 2020 06:16:23 +0000 (01:16 -0500)
One of the changes in commit 81e47875e3de0e52fbb11d61ef30a9406497af73
unintentionally caused the return value of profile_ser_externalize()
to be ignored.

src/lib/krb5/krb/ser_ctx.c

index 80cd05640c4046adfdb9c638eb4f974f93ccf109..9d5f9dedfa87ddc2fe1bc3f3be9aeb7721c8c18c 100644 (file)
@@ -204,8 +204,11 @@ k5_externalize_context(krb5_context context,
         return (kret);
 
     /* Finally, handle profile, if appropriate */
-    if (context->profile != NULL)
+    if (context->profile != NULL) {
         kret = profile_ser_externalize(NULL, context->profile, &bp, &remain);
+        if (kret)
+            return (kret);
+    }
 
     /*
      * If we were successful, write trailer then update the pointer and