genius3000 182c8a34d5 Fix memory leak from read_camera_dir() (#694)
In commit da556d7 (store the value of 'camera_dir'), a memory leak
was introduced due to not freeing this memory in context_destroy().
I followed the advice in PR #639 to correct this.
Valgrind was used to find this leak and test for successful fixing.
Config included a 'camera_dir' with two camera config files.
Command ran: valgrind --leak-check=full ./bin/motion -n

Before:
HEAP SUMMARY:
    in use at exit: 91,538 bytes in 13 blocks
  total heap usage: 4,227 allocs, 4,214 frees, 20,448,321 bytes allocated

126 bytes in 3 blocks are definitely lost in loss record 8 of 11
   at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x406A6D: mymalloc (motion.c:3401)
   by 0x40D0CF: mystrdup (conf.c:2687)
   by 0x40D30C: mystrcpy (conf.c:2664)
   by 0x40D30C: copy_string (conf.c:2470)
   by 0x40D565: read_camera_dir (conf.c:2883)
   by 0x40CA10: conf_process (conf.c:2034)
   by 0x40D850: conf_load (conf.c:2236)
   by 0x407063: cntlist_create (motion.c:2876)
   by 0x407063: motion_startup (motion.c:2930)
   by 0x4052B7: main (motion.c:3128)

LEAK SUMMARY:
   definitely lost: 126 bytes in 3 blocks
   indirectly lost: 0 bytes in 0 blocks
     possibly lost: 0 bytes in 0 blocks
   still reachable: 91,412 bytes in 10 blocks
        suppressed: 0 bytes in 0 blocks

After:
HEAP SUMMARY:
    in use at exit: 91,412 bytes in 10 blocks
  total heap usage: 4,201 allocs, 4,191 frees, 20,447,579 bytes allocated

LEAK SUMMARY:
   definitely lost: 0 bytes in 0 blocks
   indirectly lost: 0 bytes in 0 blocks
     possibly lost: 0 bytes in 0 blocks
   still reachable: 91,412 bytes in 10 blocks
        suppressed: 0 bytes in 0 blocks
2018-04-05 20:32:56 -06:00
2018-03-25 16:39:57 -06:00
2018-03-25 16:39:57 -06:00
2018-03-25 16:39:57 -06:00
2018-01-07 18:37:01 -07:00
2005-12-27 08:54:39 +00:00
2018-02-21 17:32:27 -07:00
2018-03-25 16:39:57 -06:00
2016-08-25 22:16:47 -06:00
2018-03-25 16:39:57 -06:00
2017-12-30 07:54:55 -07:00
2017-11-07 21:02:29 -07:00
2018-01-07 18:37:01 -07:00
2018-03-25 16:39:57 -06:00
2017-07-30 17:07:40 -06:00
2018-03-25 16:39:57 -06:00
2016-08-25 22:16:47 -06:00
2010-05-23 00:01:05 +02:00
2010-05-23 00:01:05 +02:00
2017-10-28 17:29:16 -06:00
2008-07-16 20:34:23 +00:00
2018-01-07 18:37:01 -07:00
2018-01-02 17:55:43 -07:00
2018-03-01 18:07:06 -07:00
2018-03-01 18:07:06 -07:00
2017-10-28 17:29:16 -06:00
2017-10-28 17:29:16 -06:00
2017-02-12 18:25:43 -07:00
2017-02-12 18:25:43 -07:00
2018-03-25 16:39:57 -06:00
2017-10-28 17:29:16 -06:00
2016-08-25 22:16:47 -06:00
2016-08-25 22:16:47 -06:00
2016-08-25 22:16:47 -06:00
2018-03-25 16:39:57 -06:00
2017-10-28 17:29:16 -06:00
2017-02-12 16:20:27 -07:00
2018-01-07 18:37:01 -07:00
2018-03-25 16:39:57 -06:00
2017-10-28 17:29:16 -06:00
2018-03-25 16:39:57 -06:00
2018-03-25 16:39:57 -06:00
2018-02-10 07:30:13 -07:00
2018-03-25 16:39:57 -06:00
2018-03-25 16:39:57 -06:00
2017-12-09 18:15:00 -07:00
2017-10-28 17:29:16 -06:00
2017-02-12 16:20:27 -07:00
2018-04-05 20:08:40 -06:00
2018-03-01 18:07:06 -07:00

Motion

Status

The build status from travis-ci for the master branch is: Build Status

Description

Motion is a program that monitors the video signal from one or more cameras and is able to detect if a significant part of the picture has changed. Or in other words, it can detect motion.

Documentation

The documentation for Motion is contained within the file motion_guide.html.

The offline version of this file is available in the doc/motion directory. The online version of the motion_guide.html file can be viewed here

In addition to the detailed building instructions included within the guide, the INSTALL file contains abbreviated building instructions.

Resources

Please join the mailing list here

We prefer support through the mailing list because more people will have the benefit from the answers. A archive of mailing list discussions can be viewed here

License

Motion is mainly distributed under the GNU GENERAL PUBLIC LICENSE (GPL) version 2 or later. See the copyright file for a list of all the licensing terms of the various components of Motion.

The file CREDITS lists the many people who have contributed to Motion over the years.

Contributing

Issues and Patches should be submitted via github and include detail descriptions of the issue being addressed as well as any documentation updates that would be needed with the change.

Description
No description provided
Readme GPL-3.0 25 MiB
Languages
C++ 97.5%
M4 1.9%
Makefile 0.6%