summaryrefslogtreecommitdiff
path: root/libpam/pam_modutil_cleanup.c
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2005-09-21 10:00:58 +0000
committerTomas Mraz <tm@t8m.info>2005-09-21 10:00:58 +0000
commitbe09d6354efcb2571731bdffc47da86f22621ac8 (patch)
tree82117bfbaadb46495a545ba4f567dc9bddd97c33 /libpam/pam_modutil_cleanup.c
parent627a0401899af257f0fb711ad54194e14a75c530 (diff)
Relevant BUGIDs:
Purpose of commit: new feature Commit summary: --------------- Moved functions from pammodutil to libpam.
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..8224ce67
--- /dev/null
+++ b/libpam/pam_modutil_cleanup.c
@@ -0,0 +1,19 @@
+/*
+ * $Id$
+ *
+ * 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);
+ }
+}