diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
index e299be1..58c1950 100644
--- a/camel/camel-search-private.c
+++ b/camel/camel-search-private.c
@@ -465,12 +465,7 @@ camel_search_header_match (const gchar *value,
 		 * which should be common. */
 		vdom = strchr (value, '@');
 		mdom = strchr (match, '@');
-		if (mdom == NULL && vdom != NULL) {
-			v = g_alloca (vdom - value + 1);
-			memcpy (v, value, vdom - value);
-			v[vdom - value] = 0;
-			value = (gchar *) v;
-		} else if (mdom != NULL && vdom == NULL) {
+		if (mdom != NULL && vdom == NULL) {
 			v = g_alloca (mdom - match + 1);
 			memcpy (v, match, mdom - match);
 			v[mdom - match] = 0;
