aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samples/kobject/kset-example.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c
index b0a1b4fe6584..7395c0bbae18 100644
--- a/samples/kobject/kset-example.c
+++ b/samples/kobject/kset-example.c
@@ -211,7 +211,7 @@ static struct foo_obj *create_foo_obj(const char *name)
211 */ 211 */
212 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name); 212 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name);
213 if (retval) { 213 if (retval) {
214 kfree(foo); 214 kobject_put(&foo->kobj);
215 return NULL; 215 return NULL;
216 } 216 }
217 217