If you are pushing data onto the list that already exists, then return success.
Do not push the data in a second time.
This commit is contained in:
parent
56d9d20a64
commit
6f84cfd00c
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue