Implementing Frequency Domain Convolution in MATLAB (Convolution Theorem)
You need to set the length as well in your fft command.
The two signals are of length $5$ and their convolution is of length $5+5-1=9$. So use this instead:

a=[1 2 3 4 5];
b=[6 7 8 9 10];
x=fft(a,9);
y=fft(b,9);
ifft(x.*y)

ans =

Columns 1 through 8

6.0000   19.0000   40.0000   70.0000  110.0000  114.0000  106.0000   85.0000

Column 9

50.0000

conv(a,b)
ans =

 6    19    40    70   110   114   106    85    50