diff options
-rw-r--r-- | common/miiphyutil.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index c0274f4..cff93b1 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -113,6 +113,8 @@ void miiphy_register(const char *name, if (new_dev == NULL || ldev == NULL) { printf("miiphy_register: cannot allocate memory for '%s'\n", name); + free(ldev); + mdio_free(new_dev); return; } |