- /* these hooks allow multiple commands with the same
- * pattern, so if we've already seen this pattern/command pair, just
- * ignore it instead of creating a duplicate */
- if (!mutt_strcmp (ptr->command, command.data))
- {
- FREE (&command.data);
- FREE (&pattern.data);
- return 0;
- }
- }
- else
- {
- /* other hooks only allow one command per pattern, so update the
- * entry with the new command. this currently does not change the
- * order of execution of the hooks, which i think is desirable since
- * a common action to perform is to change the default (.) entry
- * based upon some other information. */
- FREE (&ptr->command);
- ptr->command = command.data;
- FREE (&pattern.data);
- return 0;
+ /* these hooks allow multiple commands with the same
+ * pattern, so if we've already seen this pattern/command pair, just
+ * ignore it instead of creating a duplicate */
+ if (!m_strcmp(ptr->command, command.data)) {
+ p_delete(&command.data);
+ p_delete(&pattern.data);
+ return 0;
+ }
+ } else {
+ /* other hooks only allow one command per pattern, so update the
+ * entry with the new command. this currently does not change the
+ * order of execution of the hooks, which i think is desirable since
+ * a common action to perform is to change the default (.) entry
+ * based upon some other information. */
+ p_delete(&ptr->command);
+ ptr->command = command.data;
+ p_delete(&pattern.data);
+ return 0;