diff -rup motion/netcam_rtsp.c motion.cgr/netcam_rtsp.c
--- motion/netcam_rtsp.c   2014-11-28 16:15:08.172190280 +0100
+++ motion.cgr/netcam_rtsp.c   2014-12-10 10:27:36.444406204 +0100
@@ -258,6 +258,8 @@ int netcam_read_rtsp_image(netcam_contex
   if (size_decoded == 0) {
     // something went wrong, end of stream?
     MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "%s: invalid frame!");
+    av_free_packet(&packet);
+    av_free(frame);
     return -1;
   }
 
| Motion version: | Git-28b7cb2a4297c78b9c08c9ce29a648aeb22120d0 | 
| ffmpeg version: | 2.1.6 | 
| Shared libraries: | ffmpeg | 
| Server OS: | CentOS 6.6 | 
| TopicTitle | Fix for mem leak in read_rtsp_image() | 
| BugStatus | New | 
| AssignedBugTo | |
| SubmittedBy | ChristopheGRENIER |