Skip to content

Commit

Permalink
Additional mydelete revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Dave committed Jul 23, 2024
1 parent fcf7912 commit 0f86c40
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/motionplus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,19 +490,15 @@ static void motpls_shutdown(ctx_motapp *motapp)
{
motpls_pid_remove(motapp);

delete motapp->webu;
mydelete(motapp->webu);

dbse_deinit(motapp);

conf_deinit(motapp);

delete motapp->conf;
motapp->conf = nullptr;;

delete motlog;
motlog = nullptr;

delete motapp->all_sizes;
mydelete(motapp->conf);
mydelete(motapp->all_sizes);
mydelete(motlog);

}

Expand Down Expand Up @@ -891,8 +887,6 @@ static void motpls_deinit(ctx_motapp *motapp)
pthread_mutex_destroy(&motapp->mutex_camlst);
pthread_mutex_destroy(&motapp->mutex_post);

delete motapp->conf;

}
/* Check for whether to add a new cam */
static void motpls_cam_add(ctx_motapp *motapp)
Expand Down Expand Up @@ -1075,8 +1069,8 @@ int main (int argc, char **argv)
}

MOTPLS_LOG(NTC, TYPE_ALL, NO_ERRNO, _("MotionPlus terminating"));

motpls_deinit(motapp);

delete motapp;

return 0;
Expand Down

0 comments on commit 0f86c40

Please sign in to comment.