halex@ and krw@ pointed out that a NULL check before free can go, too.
ok deraadt@, halex@, krw@
-/* $OpenBSD: options.c,v 1.69 2014/07/09 12:55:31 krw Exp $ */
+/* $OpenBSD: options.c,v 1.70 2014/07/28 16:45:35 tobias Exp $ */
/* DHCP options parsing and reassembly. */
free(info);
for (i = 0; i < 256; i++)
- if (options[i].len && options[i].data)
- free(options[i].data);
+ free(options[i].data);
}
-/* $OpenBSD: options.c,v 1.27 2014/07/11 09:42:27 yasuoka Exp $ */
+/* $OpenBSD: options.c,v 1.28 2014/07/28 16:45:35 tobias Exp $ */
/* DHCP options parsing and reassembly. */
/* Free the data associated with the options. */
for (i = 0; i < 256; i++)
- if (tp.options[i].len && tp.options[i].data)
- free(tp.options[i].data);
+ free(tp.options[i].data);
}