You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
정상적으로 fetch한 결과인 데, NULL을 리턴하게 된다면 응용에서는 그 결과를 잘못 이해하게 된다.
libmemcached 문서에는 다음과 같이 쓰여 있습니다.
memcached_get() will return NULL on error. You must look at the value of error to determine what the actual error was.
memcached_get에서 에러 발생 유무는 NULL이 아닌 error 값을 확인하는 것을 권장하고 있습니다.
이러한 동작이 맞는 지를 검토한다.
정확히 어떤 동작이 맞는지 결정하기에는 어려울 것 같습니다.
memcached_get 에서 반환되는 value는 보통 동적으로 메모리를 할당해서 반환됩니다.
이 상태에서 value_length가 0인 value가 NULL이 아닌 경우,
오히려 응용에서는 value에 메모리가 할당되지 않았음에도 불구하고 free를 시도하게 될 수 있습니다.
🔍 Description
⏰ Implementation Idea
The text was updated successfully, but these errors were encountered: