summaryrefslogtreecommitdiff
path: root/usr.sbin/btdevctl
diff options
context:
space:
mode:
authorplunky <plunky@NetBSD.org>2006-09-29 18:48:17 +0000
committerplunky <plunky@NetBSD.org>2006-09-29 18:48:17 +0000
commitebb327f7cdeda1f70b7d7d23e4de3e7c5484fa4e (patch)
tree4a532894ae11017e0d66dade1b1d31b01cd6113a /usr.sbin/btdevctl
parente02941da8f6c2a21ea0e2f5c77689fb9ac19ea46 (diff)
back off previous changes since the 'memory leak' fix - we dont need any of
that, just use the _nocopy version of the function.
Diffstat (limited to 'usr.sbin/btdevctl')
-rw-r--r--usr.sbin/btdevctl/print.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/btdevctl/print.c b/usr.sbin/btdevctl/print.c
index 27da09ad434..821abd6019c 100644
--- a/usr.sbin/btdevctl/print.c
+++ b/usr.sbin/btdevctl/print.c
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.6 2006/09/28 09:13:56 he Exp $ */
+/* $NetBSD: print.c,v 1.7 2006/09/29 18:48:17 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: print.c,v 1.6 2006/09/28 09:13:56 he Exp $");
+__RCSID("$NetBSD: print.c,v 1.7 2006/09/29 18:48:17 plunky Exp $");
#include <sys/types.h>
@@ -73,7 +73,6 @@ __RCSID("$NetBSD: print.c,v 1.6 2006/09/28 09:13:56 he Exp $");
#include <bluetooth.h>
#include <err.h>
#include <usbhid.h>
-#include <stdlib.h>
#include "btdevctl.h"
@@ -87,7 +86,6 @@ void
cfg_print(prop_dictionary_t dict)
{
prop_object_t obj;
- char *p;
obj = prop_dictionary_get(dict, BTDEVladdr);
if (prop_object_type(obj) != PROP_TYPE_DATA) {
@@ -106,9 +104,7 @@ cfg_print(prop_dictionary_t dict)
printf("No device type!\n");
return;
}
- p = prop_string_cstring(obj);
- printf("device type: %s\n", p);
- free(p);
+ printf("device type: %s\n", prop_string_cstring_nocopy(obj));
if (prop_string_equals_cstring(obj, "bthidev")) {
cfg_bthidev(dict);