/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void
stp_destroy(struct stp *stp)
{
- free(stp);
+ if (stp) {
+ free(stp->name);
+ free(stp);
+ }
}
/* Runs 'stp' given that 'ms' milliseconds have passed. */