+Thu Sep 22 21:37:15 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * fcc_destry.c (krb5_fcc_destroy): Make sure memory associated
+ with the credentials cache is freed after it is destroyed.
+
Thu Aug 18 16:33:33 1994 Theodore Y. Ts'o (tytso at tsx-11)
* fcc_retrv.c (srvname_match): Fix bug in srvname_match where so
if (OPENCLOSE(id)) {
ret = open(((krb5_fcc_data *) id->data)->filename, O_RDWR, 0);
- if (ret < 0)
- return krb5_fcc_interpret(errno);
+ if (ret < 0) {
+ ret = krb5_fcc_interpret(errno);
+ goto cleanup;
+ }
((krb5_fcc_data *) id->data)->fd = ret;
}
else
(void) close(((krb5_fcc_data *)id->data)->fd);
((krb5_fcc_data *) id->data)->fd = -1;
}
- return ret;
+ goto cleanup;
}
ret = fstat(((krb5_fcc_data *) id->data)->fd, &buf);
(void) close(((krb5_fcc_data *)id->data)->fd);
((krb5_fcc_data *) id->data)->fd = -1;
}
- return ret;
+ goto cleanup;
}
/* XXX This may not be legal XXX */
(void) close(((krb5_fcc_data *)id->data)->fd);
((krb5_fcc_data *) id->data)->fd = -1;
}
- return ret;
+ goto cleanup;
}
if (write(((krb5_fcc_data *) id->data)->fd, zeros, size % BUFSIZ) < 0) {
(void) close(((krb5_fcc_data *)id->data)->fd);
((krb5_fcc_data *) id->data)->fd = -1;
}
- return ret;
+ goto cleanup;
}
ret = close(((krb5_fcc_data *) id->data)->fd);
if (ret)
ret = krb5_fcc_interpret(errno);
+ cleanup:
+ xfree(((krb5_fcc_data *) id->data)->filename);
+ xfree(id->data);
+ xfree(id);
+
return ret;
}
+Thu Sep 22 21:38:09 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * scc_destry.c (krb5_scc_destroy): Make sure memory associated
+ with the credentials cache is freed after it is destroyed.
+
Thu Aug 18 16:34:51 1994 Theodore Y. Ts'o (tytso at tsx-11)
* scc_retrv.c (srvname_match): Fix bug in srvname_match where so
(void) fclose(data->file);
data->file = 0;
}
- return ret;
+ goto cleanup;
}
#if 0
(void) fclose(data->file);
data->file = 0;
}
- return ret;
+ goto cleanup;
}
/* XXX This may not be legal XXX */
(void) fclose(data->file);
data->file = 0;
}
- return ret;
+ goto cleanup;
}
if (fwrite(data->file, zeros, size % BUFSIZ) < 0) {
(void) fclose(data->file);
data->file = 0;
}
- return ret;
+ goto cleanup;
}
ret = fclose(data->file);
if (ret)
ret = krb5_scc_interpret(errno);
+ cleanup:
+ xfree(data->filename);
+ xfree(data);
+ xfree(id);
+
return ret;
}