* svr_principal.c (kadm5_modify_principal): don't free the
authorBarry Jaspan <bjaspan@mit.edu>
Wed, 6 Nov 1996 21:22:52 +0000 (21:22 +0000)
committerBarry Jaspan <bjaspan@mit.edu>
Wed, 6 Nov 1996 21:22:52 +0000 (21:22 +0000)
  caller's tl_data (oops)

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9306 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kadm5/srv/ChangeLog
src/lib/kadm5/srv/svr_principal.c

index 0faa215fcb688c547c6dd29bd5794fda4e44804f..a0885bf3139ed8e9c0319d0a774b47a54b157eb4 100644 (file)
@@ -1,3 +1,8 @@
+Wed Nov  6 16:22:05 1996  Barry Jaspan  <bjaspan@mit.edu>
+
+       * svr_principal.c (kadm5_modify_principal): don't free the
+       caller's tl_data (oops)
+
 Fri Nov  1 13:18:40 1996  Barry Jaspan  <bjaspan@mit.edu>
 
        * svr_principal.c (kadm5_modify_principal): update for new tl_data
index 380cf1f7490c9b00cde46ad168181e694064a6dd..ecd2d2d3f851a4b56a000de1c636fd7c9a9ec0d9 100644 (file)
@@ -522,8 +522,13 @@ kadm5_modify_principal(void *server_handle,
         kdb.n_tl_data = entry->n_tl_data;
     }
 
-    if ((ret = kdb_put_entry(handle, &kdb, &adb)))
-       goto done;
+    ret = kdb_put_entry(handle, &kdb, &adb);
+    if (mask & KADM5_TL_DATA) {
+        /* prevent kdb_free_entry from freeing the caller's data */
+        kdb.tl_data = NULL;
+        kdb.n_tl_data = 0;
+    }
+    if (ret) goto done;
 
     ret = KADM5_OK;
 done: