get_val() already frees the buffer passed to it so we don't need to
authormillert <millert@openbsd.org>
Mon, 15 Jun 2015 14:29:52 +0000 (14:29 +0000)
committermillert <millert@openbsd.org>
Mon, 15 Jun 2015 14:29:52 +0000 (14:29 +0000)
do it in the caller.

usr.sbin/sensorsd/sensorsd.c

index e63cf96..2f13e00 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sensorsd.c,v 1.55 2015/06/02 23:05:05 millert Exp $ */
+/*     $OpenBSD: sensorsd.c,v 1.56 2015/06/15 14:29:52 millert Exp $ */
 
 /*
  * Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -721,11 +721,9 @@ parse_config_sdlim(struct sdlim_t *sdlim, char *cf)
                if (cgetstr(buf, "low", &ebuf) < 0)
                        ebuf = NULL;
                p->lower = get_val(ebuf, 0, p->type);
-               free(ebuf);
                if (cgetstr(buf, "high", &ebuf) < 0)
                        ebuf = NULL;
                p->upper = get_val(ebuf, 1, p->type);
-               free(ebuf);
                if (cgetstr(buf, "command", &ebuf) < 0)
                        ebuf = NULL;
                if (ebuf != NULL) {