LCDproc development and user support list

Text archives Help


[Lcdproc] PATCH: Memory leak in PicoLCD driver


Chronological Thread 
  • From: jack at jackpot.uk.net (Jack Cleaver)
  • Subject: [Lcdproc] PATCH: Memory leak in PicoLCD driver
  • Date: Mon, 01 Sep 2008 10:33:14 +0100

Hi,

I'm offering the attached patch for the picoLCD driver.

I'm no great shakes as a C/Linux coder, not having worked in C for over
15 years. I'd therefore appreciate if someone could verify by inspection
that what appears to be an obvious leak really is a leak, and that this
patch fixes it (without breaking something else).

JackC.

jackc at virya:~/Projects/lcdproc-0.5.2/server/drivers$ diff picolcd.c-orig
picolcd.c
303a304
> char * retval = NULL;
329a331,333
>
> if (strlen(keystr))
> retval = keystr;
333d336
< return NULL;
342,345c345
< if (! strlen(keystr))
< return NULL;
<
< return keystr;
---
> return retval;




Archive powered by MHonArc 2.6.18.

Top of page