diff options
| author | Roy Marples <roy@marples.name> | 2020-10-12 14:56:34 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-10-12 14:56:34 +0100 |
| commit | 40a08e98eee7c7458e67a2e30aba2b8b42b2aba2 (patch) | |
| tree | 07980b305b7be989e8c4e53b6b5433ef2b3dabad | |
| parent | fadb847a8eba78e8d6db058ca5e5cb3087d32893 (diff) | |
| download | dhcpcd-40a08e98eee7c7458e67a2e30aba2b8b42b2aba2.tar.xz | |
duid: plug a potential memory leakdhcpcd-9.3.1
| -rw-r--r-- | src/duid.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -178,8 +178,9 @@ duid_get(struct dhcpcd_ctx *ctx, const struct interface *ifp) if (ifp == NULL) { if (ctx->duid_type != DUID_DEFAULT && ctx->duid_type != DUID_UUID) - return 0; - len = duid_make_uuid(data); + len = 0; + else + len = duid_make_uuid(data); if (len == 0) free(data); else |
