summaryrefslogtreecommitdiff
path: root/libpam/pam_modutil_cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpam/pam_modutil_cleanup.c')
-rw-r--r--libpam/pam_modutil_cleanup.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libpam/pam_modutil_cleanup.c b/libpam/pam_modutil_cleanup.c
new file mode 100644
index 00000000..017b36cf
--- /dev/null
+++ b/libpam/pam_modutil_cleanup.c
@@ -0,0 +1,19 @@
+/*
+ * $Id: pam_modutil_cleanup.c,v 1.1 2005/09/21 10:00:58 t8m Exp $
+ *
+ * This function provides a common pam_set_data() friendly version of free().
+ */
+
+#include "pam_modutil_private.h"
+
+#include <stdlib.h>
+
+void
+pam_modutil_cleanup (pam_handle_t *pamh UNUSED, void *data,
+ int error_status UNUSED)
+{
+ if (data) {
+ /* junk it */
+ (void) free(data);
+ }
+}