-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJpKMcACgkQrlYvE4MpobOB2QCfY+vXt4YwzIyp3O9hpEhNZ+SQ D20AoLaqGYNn9Qu76Ro3rh9DtrflC7M0 =64Gl -----END PGP SIGNATURE-----
>From 49fb5fabda2f573782d3c5ba9b54d475234994d2 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Wed, 9 Oct 2013 16:51:22 -0400 Subject: [PATCH 23/74] If you are pushing data onto the list that already exists, then return success. Do not push the data in a second time. --- libsemanage/src/utilities.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsemanage/src/utilities.c b/libsemanage/src/utilities.c index 349a4be..a340fc8 100644 --- a/libsemanage/src/utilities.c +++ b/libsemanage/src/utilities.c @@ -140,6 +140,10 @@ int semanage_list_push(semanage_list_t ** list, char *data) if (!data) return EINVAL; + + if (semanage_list_find(*list, data) != NULL) + return 0; + if (!(temp = malloc(sizeof(semanage_list_t)))) return ENOMEM; -- 1.8.3.1