diff options
Diffstat (limited to '')
-rw-r--r-- | src/command.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/command.c b/src/command.c index b1d222250..4631e7697 100644 --- a/src/command.c +++ b/src/command.c @@ -679,10 +679,7 @@ handle_playlistfind(struct client *client, int argc, char *argv[]) struct locate_item_list *list = locate_item_list_parse(argv + 1, argc - 1, false); - if (list == NULL || list->length == 0) { - if (list != NULL) - locate_item_list_free(list); - + if (list == NULL) { command_error(client, ACK_ERROR_ARG, "incorrect arguments"); return COMMAND_RETURN_ERROR; } @@ -700,10 +697,7 @@ handle_playlistsearch(struct client *client, int argc, char *argv[]) struct locate_item_list *list = locate_item_list_parse(argv + 1, argc - 1, true); - if (list == NULL || list->length == 0) { - if (list != NULL) - locate_item_list_free(list); - + if (list == NULL) { command_error(client, ACK_ERROR_ARG, "incorrect arguments"); return COMMAND_RETURN_ERROR; } |