]> git.ipfire.org Git - thirdparty/lldpd.git/blobdiff - src/lib/atom.h
lib: fix memory leak when handling I/O
[thirdparty/lldpd.git] / src / lib / atom.h
index 615b315a9d7c769f19b95678b89a3dd31f72899e..a818f7ac967541349f1ad78bfdcad85b40be5c98 100644 (file)
@@ -55,11 +55,10 @@ struct lldpctl_conn_t {
 #define CONN_STATE_GET_DEFAULT_PORT_SEND 15
 #define CONN_STATE_GET_DEFAULT_PORT_RECV 16
        int state;              /* Current state */
-       char *state_data;       /* Data attached to the state. It is used to
-                                * check that we are using the same data as a
-                                * previous call until the state machine goes to
-                                * CONN_STATE_IDLE. */
-
+       /* Data attached to the state. It is used to check that we are using the
+        * same data as a previous call until the state machine goes to
+        * CONN_STATE_IDLE. */
+       char state_data[IFNAMSIZ + 64];
        /* Error handling */
        lldpctl_error_t error;  /* Last error */