diff options
Diffstat (limited to 'net/irda/irias_object.c')
-rw-r--r-- | net/irda/irias_object.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c index 6fec428b4512..75f2666e8630 100644 --- a/net/irda/irias_object.c +++ b/net/irda/irias_object.c | |||
@@ -122,8 +122,7 @@ static void __irias_delete_attrib(struct ias_attrib *attrib) | |||
122 | IRDA_ASSERT(attrib != NULL, return;); | 122 | IRDA_ASSERT(attrib != NULL, return;); |
123 | IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;); | 123 | IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;); |
124 | 124 | ||
125 | if (attrib->name) | 125 | kfree(attrib->name); |
126 | kfree(attrib->name); | ||
127 | 126 | ||
128 | irias_delete_value(attrib->value); | 127 | irias_delete_value(attrib->value); |
129 | attrib->magic = ~IAS_ATTRIB_MAGIC; | 128 | attrib->magic = ~IAS_ATTRIB_MAGIC; |
@@ -136,8 +135,7 @@ void __irias_delete_object(struct ias_object *obj) | |||
136 | IRDA_ASSERT(obj != NULL, return;); | 135 | IRDA_ASSERT(obj != NULL, return;); |
137 | IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); | 136 | IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); |
138 | 137 | ||
139 | if (obj->name) | 138 | kfree(obj->name); |
140 | kfree(obj->name); | ||
141 | 139 | ||
142 | hashbin_delete(obj->attribs, (FREE_FUNC) __irias_delete_attrib); | 140 | hashbin_delete(obj->attribs, (FREE_FUNC) __irias_delete_attrib); |
143 | 141 | ||
@@ -562,14 +560,12 @@ void irias_delete_value(struct ias_value *value) | |||
562 | /* No need to deallocate */ | 560 | /* No need to deallocate */ |
563 | break; | 561 | break; |
564 | case IAS_STRING: | 562 | case IAS_STRING: |
565 | /* If string, deallocate string */ | 563 | /* Deallocate string */ |
566 | if (value->t.string != NULL) | 564 | kfree(value->t.string); |
567 | kfree(value->t.string); | ||
568 | break; | 565 | break; |
569 | case IAS_OCT_SEQ: | 566 | case IAS_OCT_SEQ: |
570 | /* If byte stream, deallocate byte stream */ | 567 | /* Deallocate byte stream */ |
571 | if (value->t.oct_seq != NULL) | 568 | kfree(value->t.oct_seq); |
572 | kfree(value->t.oct_seq); | ||
573 | break; | 569 | break; |
574 | default: | 570 | default: |
575 | IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__); | 571 | IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__); |