Source: nut
Version: 2.6.1-2
Severity: normal
Tags: patch
File: drivers/rhino.c

  I don't use this driver.
  I can't see where the allocated memory at line 648 is freed. 
I also think that the whole time update block is unused.
  I think there is a similar issue in the drivers/rhino.c:getbaseinfo().
Are the static variables on lines 88-90 useful?  

--- a/drivers/rhino.c     2011-08-17 22:19:07.000000000 +0300
+++ b/drivers/rhino.c     2011-08-17 22:30:24.000000000 +0300
@@ -645,17 +645,6 @@
        unsigned char  temp[256];
        int tam;

-        int hours, mins;
-
-        /* time update */
-        time_t *tmt;
-        struct tm *now;
-        tmt  = ( time_t * ) malloc( sizeof( time_t ) );
-        time( tmt );
-        now = localtime( tmt );
-        hours = now->tm_hour;
-        mins = now->tm_min;
-
        temp[0] = 0; /* flush temp buffer */
        tam = ser_get_buf_len(upsfd, temp, pacsize, 3, 0);





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to