Skip to content
Browse files

net: Fix net_pkt_hexdump() to print pkt address properly

If immediate logging is disabled, then we must use log_strdup()
when printing log string allocated from stack.

Signed-off-by: Jukka Rissanen <>
  • Loading branch information...
jukkar committed Jun 24, 2019
1 parent 0a99f53 commit 034bccca2094e77c996613ba66e1251ce307a339
Showing with 1 addition and 1 deletion.
  1. +1 −1 subsys/net/ip/net_private.h
@@ -156,7 +156,7 @@ static inline void net_pkt_hexdump(struct net_pkt *pkt, const char *str)
snprintk(pkt_str, sizeof(pkt_str), "%p", pkt);

while (buf) {
LOG_HEXDUMP_DBG(buf->data, buf->len, pkt_str);
LOG_HEXDUMP_DBG(buf->data, buf->len, log_strdup(pkt_str));
buf = buf->frags;

0 comments on commit 034bccc

Please sign in to comment.
You can’t perform that action at this time.