ossp-pkg/xds/destroy.c 1.3 -> 1.4
--- destroy.c 2001/07/08 14:08:16 1.3
+++ destroy.c 2001/07/08 14:21:08 1.4
@@ -31,9 +31,14 @@
void xds_destroy(xds_t* xds)
{
+ /* Sanity checks. */
+
assert(xds != NULL);
- if (xds != NULL)
- {
- free(xds);
- }
+ if (xds == NULL)
+ return;
+
+ /* Free allocated memory. */
+
+ free(xds->engines);
+ free(xds);
}
|
|